views:

165

answers:

1

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?

+3  A: 

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.

Sam Miller
Does it being a composed operation imply that is is likely slower?
SilverSun