
24 Nov
2008
24 Nov
'08
4:56 p.m.
Sure, if you just want to read the data until the peer closes its socket,
then async_read with transfer_all is exactly what you need: when the peer
socket is closed, your handler is called with some error (usually
asio::error::eof, but not always).
The function async_read_until with some MatchCondition is used if you want
to read until some *contents* is encountered in the stream.
2008/11/24 Ken zhang
Hi lgor R
I replaced async_read_until to async_read, that Ok! My be transf_all doesn't adapt to MatchCondition.
Thanks