netdev
[Top] [All Lists]

Re: Fwd: Problem with recv syscall on socket when other side closed conn

To: dyp@xxxxxxxxxxxx
Subject: Re: Fwd: Problem with recv syscall on socket when other side closed connection
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Mon, 26 Jun 2000 21:18:14 -0700
Cc: kuznet@xxxxxxxxxxxxx, ak@xxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <0006270852390S.00485@dyp> (message from Denis Perchine on Tue, 27 Jun 2000 08:45:46 +0700)
References: <200006261515.TAA22206@ms2.inr.ac.ru> <0006270823180R.00485@dyp> <200006270131.SAA03319@pizda.ninka.net> <0006270852390S.00485@dyp>
Sender: owner-netdev@xxxxxxxxxxx
   From: Denis Perchine <dyp@xxxxxxxxxxxx>
   Date: Tue, 27 Jun 2000 08:45:46 +0700

   I need to read all data BEFORE reset occurs. The problem is that I
   get EPIPE before I get the data recieved before the reset.

And I am trying to tell you that you are not guarenteed to
get that data, ever.

Here is one example, if the network between the sql server and
your client reorders the packets such that the reset arrives before
the "reason" data, TCP will not even take the data packets and
will drop them on the floor.

The sql server should gracefully do a normal close of the socket
if it wishes the client to receive the data with any amount of
certainty.

Later,
David S. Miller
davem@xxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>