Tech Support > Computers & Technology > Programming > How to finish reading data from a connection reset by peer (in C)?
How to finish reading data from a connection reset by peer (in C)?
Posted by Trishia Rose on July 16th, 2003


OK, let's say you're exchanging info over a socket, and suddenly the
other end sends a bunch of info and immediately closes the connection.
Now recv returns -1 because the connection's dead, but you still need
to read that last burst of info! How can one do this? Thanks very
much in advance *muah*

Posted by Goran Sliskovic on July 16th, 2003



"Trishia Rose" <adomplayer@yahoo.com> wrote in message
news:b2e78b75.0307161225.7da5ac63@posting.google.c om...
I suspect you can't. Remote peer should not call close on socket unless it
has called shudtown. When you close socket any data buffered by the OS not
yet delivered will be immediatly discarded and lost.

Goran




Similar Posts