CFStream Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An abstract class that defines a stream for reading or writing bytes - modern applications should use the Network APIs instead.
public abstract class CFStream : CoreFoundation.CFType
type CFStream = class
inherit CFType
- Inheritance
- Derived
Remarks
Converting CFStreams to NSStreams
If you need to turn a CFStream into an NSStream, or an NSStream subclass, you can do so by surfacing an NSStream version of the method like this:
CFReadStream readStream;
CFWriteStream writeStream;
CFStream.CreatePairWithSocketToHost("www.google.com", 80, out readStream, out writeStream);
//
// Get NSStream variatns
//
_inputStream = ObjCRuntime.Runtime.GetNSObject<NSInputStream>(readStream.Handle);
_outputStream =
ObjCRuntime.Runtime.GetNSObject<NSOutputStream>(writeStream.Handle);
Constructors
| Name | Description |
|---|---|
| CFStream(NativeHandle, Boolean) | |
Properties
| Name | Description |
|---|---|
| Handle | (Inherited from DisposableObject) |
| Owns | (Inherited from DisposableObject) |
| ReadDispatchQueue | |
| WriteDispatchQueue | |
Methods
Events
| Name | Description |
|---|---|
| CanAcceptBytesEvent | |
| ClosedEvent | |
| ErrorEvent | |
| HasBytesAvailableEvent | |
| OpenCompletedEvent | |
Extension Methods
| Name | Description |
|---|---|
| GetHandle(INativeObject) | |
| GetNonNullHandle(INativeObject, String) | |