
2009/11/11 Igor R
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...
I've encountered cases where socket::available() > 0 but the number of bytes transfered is less than the size in the buffer. I presume this means that more data has been sent on the socket, but as a part of another send operation, which sadly brings me back to the original problem. Is there a clean way to differentiate between the case where the send operation just happened to be exactly the same amount of bytes as the buffer, and there's nothing left for that particular transfer but still more data available on the socket, and the case where there's more data available on the socket but it being part of the same send operation.