[lkml]   [2001]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Client receives TCP packets but does not ACK
>  > >  > Btw: can the aplication somehow ask the tcp/ip stack what was
>> >actualy acked?
>> >> (ie. how many bytes were acked).
>> >
>> >no, but it's not necessarily a useful number anyhow -- because it's
>> >possible that the remote end ACKd bytes but the ACK never arrives. so you
>> >can get into a situation where the remote application has the entire
>> >message but the local application doesn't know. the only way to solve
>> >this is above the TCP layer. (message duplicate elimination using an
>> >unique id.)
>> No, because if the ACK doesn't reach the sending machine, the sender
>> will retry the data until it does get an ACK.
>if the network goes down in between, the sender may never get the ACK.
>the sender will see a timeout eventually. the receiver may already be
>done with the connection and closed it and never see the error. if it
>were a protocol such as SMTP then the sender would retry later, and the
>result would be a duplicate message. (which you can eliminate above the
>TCP layer using unique ids.)

But, if the sender does not attempt to close the socket until the ACK
returns, then the receiver will see an unfinished connection and
(hopefully) realise that the message is unsafe and not attempt to
send it.

With SMTP, the last piece of data is a QUIT anyway, which occurs
after the end-of-message marker - once the QUIT is sent and/or
received, both ends know that the connection is finished with and
will close the socket independently of each other. If the network
disappears before the QUIT comes along, the receiver should be
discarding messages and the sender retrying later.
from: Jonathan "Chromatix" Morton
mail: (not for attachments)
geekcode: GCS$/E dpu(!) s:- a20 C+++ UL++ P L+++ E W+ N- o? K? w--- O-- M++$
V? PS PE- Y+ PGP++ t- 5- X- R !tv b++ DI+++ D G e+ h+ r++ y+(*)
tagline: The key to knowledge is not to rely on people to teach you it.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:17    [W:0.053 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site