Boost logo

Boost Users :

Subject: Re: [Boost-users] asio nntp reading data
From: Igor R (boost.lists_at_[hidden])
Date: 2010-10-24 07:46:17


>> You'll get some error (EOF or similar) if the peer closes the socket
>> after sending you the data. But if it doesn't close the socket, then
>> no error occurs, and read() operation will block forever.
>
> I don't send data, I receive the data, but how can I check, that I reach the
> end of the transmission? It seems the socket will block, so how can I
> determine the "end" of the sending data? Should I analyse the stream data? I
> know the last char ist a dot. Sorry, I'm a little bit confused.

If the server that sends to you the data doesn't close the socket
after the transmission, you have to analyse the data and decide when
you want to stop reading.


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