SocketAsyncEventArgs.Buffer SocketAsyncEventArgs.Buffer SocketAsyncEventArgs.Buffer SocketAsyncEventArgs.Buffer Property

定义

获取要用于异步套接字方法的数据缓冲区。Gets the data buffer to use with an asynchronous socket method.

public:
 property cli::array <System::Byte> ^ Buffer { cli::array <System::Byte> ^ get(); };
public byte[] Buffer { get; }
member this.Buffer : byte[]
Public ReadOnly Property Buffer As Byte()

属性值

Byte[]

一个 Byte 数组,表示要用于异步套接字方法的数据缓冲区。A Byte array that represents the data buffer to use with an asynchronous socket method.

注解

此属性获取当前与SocketAsyncEventArgs实例关联的数据缓冲区。This property gets the data buffer currently associated with the SocketAsyncEventArgs instance. 若要设置缓冲区, SetBuffer必须使用方法。To set the buffer, the SetBuffer method must be used.

Socket.AcceptAsync此属性用于Socket.ConnectAsyncSocket.ReceiveMessageFromAsync 、、Socket.SendToAsync 、 、Socket.SendAsync和方法。 Socket.ReceiveAsync Socket.ReceiveFromAsyncThis property is used with the Socket.AcceptAsync, Socket.ConnectAsync, Socket.ReceiveAsync, Socket.ReceiveFromAsync, Socket.ReceiveMessageFromAsync, Socket.SendAsync, and Socket.SendToAsync methods.

适用于

另请参阅