SocketAsyncOperation Enum
Represents the type of asynchronous socket operation to perform.
Namespace: System.Net.Sockets
Assembly: System.Net.Sockets.dll
Members
| Member | Description |
|---|---|
Accept |
Indicates that the operation is an asynchronous accept. |
Connect |
Indicates that the operation is an asynchronous connect. |
Disconnect |
Indicates that the operation is an asynchronous disconnect. |
Receive |
Indicates that the operation is an asynchronous receive. |
ReceiveAsync |
Indicates that the operation is an asynchronous receive. |
ReceiveFrom |
Indicates that the operation is an asynchronous receive from a specific remote endpoint. |
ReceiveFromAsync |
Indicates that the operation is an asynchronous receive from a specific remote endpoint. |
Send |
Indicates that the operation is an asynchronous send. |
SendAsync |
Indicates that the operation is an asynchronous send. |
SendPackets |
Indicates that the operation is an asynchronous send of multiple packets. |
SendTo |
Indicates that the operation is an asynchronous send to a specific remote endpoint. |
SendToAsync |
Indicates that the operation is an asynchronous send to a specific remote endpoint. |
ConnectAsync |
Indicates that the operation is an asynchronous connect. |
DisconnectAsync |
Indicates that the operation is an asynchronous disconnect. |
AcceptAsync |
Indicates that the operation is an asynchronous accept. |
SetSockOpt |
Indicates that the operation is an asynchronous setting of a socket option. |
GetSockOpt |
Indicates that the operation is an asynchronous retrieving of a socket option. |
IOControl |
Indicates that the operation is an asynchronous IO control operation. |
GetRemoteAddress |
Indicates that the operation is an asynchronous retrieval of the remote address. |
GetLocalAddress |
Indicates that the operation is an asynchronous retrieval of the local address. |
Remarks
The SocketAsyncOperation enumeration is used with the SocketAsyncEventArgs class to specify the type of asynchronous socket operation that is being performed or will be performed. This allows the Socket class to efficiently manage and pool SocketAsyncEventArgs objects for various asynchronous operations.
Tip
When using asynchronous socket operations, it is crucial to correctly set the SocketAsyncOperation property of the SocketAsyncEventArgs object to match the intended operation. This ensures that the event arguments are processed correctly by the underlying socket implementation.