Henrik Nordstrom wrote:
On Wed, 22 Sep 2004, Eric Dumazet wrote:
Thank you for the hint. But the "set blocking" makes me nervous, since I need to be sure not to block at write()/send() time...
I think it need to be blocking to enqueue the initial write on the ack. The TCP does not yet know if it can write or not..
Yes indeed, it works.
I even tried to save the FIN packet, by calling shutdown(sock, 1) ; after the send() call as in :
setnoblocking() connect() setblocking() send() setnoblocking() shutdown(sock, 1) ; /* wait the answer */
But the FIN flag is not coalesced in the Data packet... it uses a different packet (and the remote size, sends 2 ACK)
11:00:22.489283 172.16.0.118.32970 > 172.16.8.80.44: P 1:61(60) ack 1 win 46 <nop,nop,timestamp 2926960979 2278856129> (DF) [tos 0x10]
11:00:22.489331 172.16.0.118.32970 > 172.16.8.80.44: F 61:61(0) ack 1 win 46 <nop,nop,timestamp 2926960979 2278856129> (DF) [tos 0x10]
11:00:22.508301 172.16.8.80.44 > 172.16.0.118.32970: . ack 61 win 5792 <nop,nop,timestamp 2278856131 2926960979> (DF)
11:00:22.546137 172.16.8.80.44 > 172.16.0.118.32970: . ack 62 win 5792 <nop,nop,timestamp 2278856135 2926960979> (DF)
Thank you Eric
Regards Henrik
- : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html