Subject: Re: [Boost-users] boost::asio determining end of stream,
From: Igor R (boost.lists_at_[hidden])
Date: 2010-02-18 12:21:22


> This method " tcp::socket::available()" really solved most of my problem

IUUC, available() cannot solve any fundamental problem, and it's bad
idea to rely on it. You can use available() to perform some
"speculative" blocking read, for exmaple, after your async_read_some()
handler is called, but nobody can guarantee that you will not get some
more data next moment, *after* you called available().