24 Oct
2010
24 Oct
'10
11:46 a.m.
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.