SocketAsyncOperation 枚举

定义

最近使用此上下文对象执行的异步套接字操作的类型。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
继承
SocketAsyncOperation

字段

Accept 1

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

Connect 2

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

Disconnect 3

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

None 0

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

Receive 4

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

ReceiveFrom 5

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

ReceiveMessageFrom 6

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

Send 7

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

SendPackets 8

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

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.

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

适用于

另请参阅