Reputation: 20205
Is it better to use boost::asio::basic_stream_socket::async_read_some instead of boost::asio::async_read when it comes to high performance data throughput?
Upvotes: 6
Views: 1801
Reputation: 24174
boost::asio::async_read
is a composed operation, which is well described in the documentation
This operation is implemented in terms of zero or more calls to the stream's async_read_some function, and is known as a composed operation. The program must ensure that the stream performs no other read operations (such as async_read, the stream's async_read_some function, or any other composed operations that perform reads) until this operation completes.
any performance conclusions should be based on empirical data depending on your application.
Upvotes: 3