CFSocket Class

Definition

CoreFoundation low-level Socket library - use the Network APIs instead.

public class CFSocket : CoreFoundation.CFType, IDisposable, ObjCRuntime.INativeObject
type CFSocket = class
    inherit CFType
    interface INativeObject
    interface IDisposable
Inheritance
CFSocket
Implements

Constructors

CFSocket()

Creates a socket for the address family family INET, socket type STREAM, and protocol TCP.

CFSocket(AddressFamily, SocketType, ProtocolType)

Creates a socket by specifying an address family, scoket type and protocol type dispatched on the Current.

CFSocket(AddressFamily, SocketType, ProtocolType, CFRunLoop)

Creates a socket by specifying an address family, socket type and protocol type with a specified run loop to dispatch on.

Properties

Handle

Handle (pointer) to the unmanaged object representation.

Methods

Connect(IPAddress, Int32, Double)

Connects the socket to the specified IP address and port.

Connect(IPEndPoint, Double)

Connects the socket to the specified endpoint.

CreateConnectedToSocketSignature(AddressFamily, SocketType, ProtocolType, IPEndPoint, Double)

Creates a connected socket by specifying an address family, socket type, protocol type as well as the endpoint to connect to.

DisableCallBacks(CFSocketCallBackType)

Disables a set of events from being raised.

Dispose()

Releases the resources used by the CFSocket object.

Dispose(Boolean)

Releases the resources used by the CFSocket object.

EnableCallBacks(CFSocketCallBackType)

Enables a set of events to be raised.

Finalize()

Finalizer for the CFSocket object

GetDescription(IntPtr)

Returns a textual representation of the specified object.

(Inherited from CFType)
GetSocketFlags()

Returns the set of CFSocket-specific flags.

SendData(Byte[], Double)

Sends data over the socket.

SetAddress(IPAddress, Int32)

Sets the listening address for this socket (equivalent to the BSD bind call).

SetAddress(IPEndPoint)

Sets the listening address for this socket (equivalent to the BSD bind call).

SetSocketFlags(CFSocketFlags)

Sets the CFSocket-specific flags.

Events

AcceptEvent

Event raised when the socket has accepted a connection (listening sockets).

ConnectEvent

Event raised when the socket connect operation has completed.

DataEvent

Event raised when data has been received on the socket.

ReadEvent

Event raised when data is available to be read (the event handler must read the data itself).

WriteEvent

Event raised when data can be written to the sockets without blocking.

Applies to