Socket Methods
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
The Socket type exposes the following members.
| Name | Description | |
|---|---|---|
|
AcceptAsync | Begins an asynchronous operation to accept an incoming connection attempt. |
|
Bind | Associates a socket with a specific local endpoint. You do not need to call Bind before using the ConnectAsync method unless you need to use a specific local endpoint. |
|
CancelConnectAsync | Cancels an outstanding asynchronous socket operation for a remote host connection. |
|
Close() | Closes the Socket connection and releases all associated resources. |
|
Close(Int32) | Closes the Socket connection and releases all associated resources with a specified timeout to allow queued data to be sent. |
|
ConnectAsync(SocketAsyncEventArgs) | Begins an asynchronous request for a remote host connection. |
|
ConnectAsync(SocketType, ProtocolType, SocketAsyncEventArgs) | Begins an asynchronous request for a remote host connection. |
|
Dispose() | Releases the unmanaged resources used by the Socket, and optionally disposes of the managed resources. |
|
Dispose(Boolean) | Releases the unmanaged resources used by the Socket, and optionally disposes of the managed resources. |
|
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
|
Finalize | Frees resources used by the Socket class. (Overrides Object.Finalize().) |
|
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetType | Gets the Type of the current instance. (Inherited from Object.) |
|
Listen | Listens for incoming connection attempts. |
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
ReceiveAsync | Begins an asynchronous request to receive data from a connected Socket object. |
|
ReceiveFromAsync | Begins an asynchronous request to receive data from a specific remote host. |
|
SendAsync | Sends data asynchronously to a connected Socket object. |
|
SendToAsync | Sends data asynchronously to a specific remote host. |
|
Shutdown | Disables sends and receives on a Socket. |
|
ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
|
AssociateToNetworkInterface | Sets information about a network interface by associating it with a new set of network interface information. (Defined by SocketExtensions.) |
|
GetCurrentNetworkInterface | Gets all available information about the network interface. (Defined by SocketExtensions.) |
|
SetNetworkPreference | Sets the preference for a network interface to use either cellular or non-cellular technology. (Defined by SocketExtensions.) |
|
SetNetworkRequirement | Sets the requirement for a network interface to use either cellular or non-cellular technology. (Defined by SocketExtensions.) |
Show: