11 Nov
2009
11 Nov
'09
1:33 p.m.
however, is there a way to distinguish the case when I receive exactly buffer size amounts of data, and when the case when there's more left to complete the transfer?
You can use socket::available() http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/reference/basic_str...
How does asio handle transfer of really large buffers? Will it dispatch it client side in receive buffer sized chunks as it enters, or will it wait for the entire payload to enter some internal buffer before dispatching?
IIRC, the current implementation of ASIO (at least in windows) just supplies your buffer(s) to the OS API that performs the actual i/o, so no additional copying occurs.