reading on sockets when connection breaks

terryl at sail.LABS.TEK.COM terryl at sail.LABS.TEK.COM
Fri Dec 14 06:28:05 AEST 1990


In article <1990Dec12.060545.7673 at Think.COM> barmar at think.com (Barry Margolin) writes:
>In article <5727 at navy40.UUCP> damenf at motcid.UUCP (Frederick Damen) writes:
>>1) After reading some related information on SIGPIPE and running a test program
>>   it seems as though SIGPIPE is only raised on a pipe/socket that has been 
>>   written to.
>
>Someone please correct me if I'm wrong (my answers are mostly educated
>guesses), but I think Unix keepalives are implemented by periodically
>retransmitting a packet with the sequence number of the last one sent.  The
>other host acknowledges having received all bytes up to that point, and
>this acknowledgement serves as the indication that it is still alive.  But
>if you haven't yet written anything, then there is nothing to retransmit


     OK, consider yourself corrected!!! (-:

     What actually happens is that sends out a packet with a sequence number
of send unacknowledged - 1, which should have been the last byte sent and
already acknowledged, which is what I guess Barry was trying to say.....

__________________________________________________________
Terry Laskodi		"There's a permanent crease
     of			 in your right and wrong."
Tektronix		Sly and the Family Stone, "Stand!"
__________________________________________________________



More information about the Comp.unix.questions mailing list