CFSocket 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.
CoreFoundation low-level Socket library - use the Network APIs instead.
public class CFSocket : CoreFoundation.CFType
type CFSocket = class
inherit CFType
- Inheritance
Constructors
| Name | Description |
|---|---|
| CFSocket() |
Creates a socket for the address family family INET, socket type STREAM, and protocol TCP. |
| 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. |
| CFSocket(AddressFamily, SocketType, ProtocolType) |
Creates a socket by specifying an address family, scoket type and protocol type dispatched on the Current. |
Properties
| Name | Description |
|---|---|
| Address | |
| Handle | (Inherited from DisposableObject) |
| Owns | (Inherited from DisposableObject) |
| RemoteAddress | |
Methods
| Name | Description |
|---|---|
| ClearHandle() | (Inherited from DisposableObject) |
| 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() | (Inherited from DisposableObject) |
| Dispose(Boolean) |
Releases the resources used by the CFSocket object. |
| EnableCallBacks(CFSocketCallBackType) |
Enables a set of events to be raised. |
| Equals(Object) | (Inherited from DisposableObject) |
| GetCheckedHandle() | (Inherited from DisposableObject) |
| GetDescription(IntPtr) |
Returns a textual representation of the specified object. (Inherited from CFType) |
| GetHashCode() | (Inherited from DisposableObject) |
| GetSocketFlags() |
Returns the set of CFSocket-specific flags. |
| InitializeHandle(NativeHandle) | (Inherited from DisposableObject) |
| Invalidate() | |
| Release() | (Inherited from NativeObject) |
| Retain() | (Inherited from NativeObject) |
| 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
| Name | Description |
|---|---|
| AcceptEvent | |
| ConnectEvent | |
| DataEvent | |
| ReadEvent | |
| WriteEvent | |
Extension Methods
| Name | Description |
|---|---|
| GetHandle(INativeObject) | |
| GetNonNullHandle(INativeObject, String) | |