boost::asio::basic_stream_socket::async_receive
Start an asynchronous receive.
Synopses
Declared in <boost/asio/basic_stream_socket.hpp>
Start an asynchronous receive.
template<
typename MutableBufferSequence,
boost::asio::completion_token_for<void(boost::system::error_code, size_t)> ReadToken = default_completion_token_t<executor_type>>
decltype(async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<initiate_async_receive>(), token,
buffers, socket_base::message_flags(0)))
async_receive(
MutableBufferSequence const& buffers,
ReadToken&& token = default_completion_token_t<executor_type>());
Start an asynchronous receive.
template<
typename MutableBufferSequence,
boost::asio::completion_token_for<void(boost::system::error_code, size_t)> ReadToken = default_completion_token_t<executor_type>>
decltype(async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<initiate_async_receive>(), token, buffers, flags))
async_receive(
MutableBufferSequence const& buffers,
socket_base::message_flags flags,
ReadToken&& token = default_completion_token_t<executor_type>());
Parameters
Name |
Description |
buffers |
One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the completion handler is called. |
token |
The |
flags |
Flags specifying how the receive call is to be made. |
Created with MrDocs