Boost logo

Boost Users :

Subject: Re: [Boost-users] Will asio::ip::tcp::socket::read let me read all my data even if remote end is connected?
From: Sean McAllister (smcallis_at_[hidden])
Date: 2010-03-22 10:07:13


How can I get all the data if it throws an exception during the last read?

On Mon, Mar 22, 2010 at 2:07 AM, Igor R <boost.lists_at_[hidden]> wrote:

> > What I'm curious about is if the server doesn't send a full block for the
> last block, and
> > then closes the connection.
> > Will this function still return whatever data it was able to read and
> then
> > throw an exception on the next read? Or will it throw an exception on
> that
> > last read, rendering the last bit of data inaccesible?
>
> read() will return an error or throw an exception, depending on the
> function overload you use, but anyway you'll get all the data sent by
> the server.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net