SocketAsyncOperation SocketAsyncOperation SocketAsyncOperation SocketAsyncOperation Enum

定义

最近使用此上下文对象执行的异步套接字操作的类型。The type of asynchronous socket operation most recently performed with this context object.

public enum class SocketAsyncOperation
public enum SocketAsyncOperation
type SocketAsyncOperation = 
Public Enum SocketAsyncOperation
继承
SocketAsyncOperationSocketAsyncOperationSocketAsyncOperationSocketAsyncOperation

字段

Accept Accept Accept Accept 1

一个套接字 Accept 操作。A socket Accept operation.

Connect Connect Connect Connect 2

一个套接字 Connect 操作。A socket Connect operation.

Disconnect Disconnect Disconnect Disconnect 3

一个套接字 Disconnect 操作。A socket Disconnect operation.

None None None None 0

没有套接字操作。None of the socket operations.

Receive Receive Receive Receive 4

一个套接字 Receive 操作。A socket Receive operation.

ReceiveFrom ReceiveFrom ReceiveFrom ReceiveFrom 5

一个套接字 ReceiveFrom 操作。A socket ReceiveFrom operation.

ReceiveMessageFrom ReceiveMessageFrom ReceiveMessageFrom ReceiveMessageFrom 6

一个套接字 ReceiveMessageFrom 操作。A socket ReceiveMessageFrom operation.

Send Send Send Send 7

一个套接字 Send 操作。A socket Send operation.

SendPackets SendPackets SendPackets SendPackets 8

一个套接字 SendPackets 操作。A socket SendPackets operation.

SendTo SendTo SendTo SendTo 9

一个套接字 SendTo 操作。A socket SendTo operation.

注解

此类型描述最近使用完成的异步套接字操作System.Net.Sockets.SocketAsyncEventArgs对象。This type describes the asynchronous socket operation that was most recently completed using a System.Net.Sockets.SocketAsyncEventArgs object. SocketAsyncEventArgs.LastOperation属性设置为无直到System.Net.Sockets.SocketAsyncEventArgs实例用于开始一个异步套接字操作。The value of the SocketAsyncEventArgs.LastOperation property is set to None until the System.Net.Sockets.SocketAsyncEventArgs instance is used to begin an asynchronous socket operation. 将属性然后将设置为所执行的异步操作的类型。The property will then be set to the type of asynchronous operation being performed. 此类型可以更轻松地为多个类型的异步套接字操作使用单独的完成回调委托。This type more easily facilitates using a single completion callback delegate for multiple kinds of asynchronous socket operations. 此类型用于 SocketAsyncCallback 完成例程。This type is intended for use in the SocketAsyncCallback completion routine.

SocketAsyncOperation类型由SocketAsyncEventArgs.LastOperation属性。The SocketAsyncOperation type is used by the SocketAsyncEventArgs.LastOperation property.

适用于

另请参阅