
6 Nov
2009
6 Nov
'09
1:49 p.m.
take follow code as example: boost::asio::async_read(socket_,boost::asio::buffer(...),boost::asio::transfer_at_least(1),boost::bind(...)); Before I think it'll return if read 1 bit, but at fact it return until receive EOF or buffer is full.
Your handler will be called only after *at least* 1 byte is read. It doesn't mean that when the handler is called, you get *exactly* 1 byte in the buffer, but *at least* 1 byte.