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 N:Network APIs instead.
public abstract class CFStream : CoreFoundation.CFType, IDisposable, ObjCRuntime.INativeObject
type CFStream = class
inherit CFType
interface INativeObject
interface IDisposable
- Inheritance
- Derived
- Implements
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
CFStream(IntPtr) |
Properties
Handle |
Handle (pointer) to the unmanaged object representation. |
ReadDispatchQueue | |
WriteDispatchQueue |
Methods
Events
CanAcceptBytesEvent | |
ClosedEvent | |
ErrorEvent | |
HasBytesAvailableEvent | |
OpenCompletedEvent |