System::Net::Sockets::Socket::BeginReceive 方法

Socket::BeginReceive method

发起异步写入操作。

System::SharedPtr<IAsyncResult> System::Net::Sockets::Socket::BeginReceive(System::ArrayPtr<uint8_t> buffer, int32_t offset, int32_t size, SocketFlags socketFlags, AsyncCallback callback, System::SharedPtr<Object> state)
参数类型描述
bufferSystem::ArrayPtr<uint8_t>接收的数据将被写入的缓冲区。
offsetint32_t指定数组中的字节偏移量。
sizeint32_t从 ‘offset’ 参数开始的指定数组中的字节数。
socketFlagsSocketFlags接收行为。
回调AsyncCallback当操作完成时将被调用的回调。
stateSystem::SharedPtr<Object>用户提供的数据,用于唯一标识每个异步接收操作。

ReturnValue

一个 IAsyncResult 对象,表示已启动的异步接收操作。

另见