Subject: Re: query: using two write() calls in succession

From: der Mouse <[email-masked]>
Date: Wed, 28 Mar 2001 08:28:44 -0500 (EST)

> I was under the impression that a blocking write (or send) call would
> block until it has received an ACK or an RST for data sent and then
> perform the 2nd write.

This is not the way any implementation I've used works (unless the
first write is larger than the buffering capacity of the socket).

> I have noticed that this happens even when I had made two write calls
> by breaking the request (1+32) while making the first normal request
> to the server.  (check the previous linuxdump.txt file).  I have
> appended relevant parts of it here:

> 17:31:17.186250 eth0 > wsasa3005.asa-ehv.ce.philips.com.1181 > asaehv.ce.philips.com.www: P 1:2(1) ack 1 win 32120 (DF) 
> 17:31:17.233839 eth0 < asaehv.ce.philips.com.www > wsasa3005.asa-ehv.ce.philips.com.1181: . 1:1(0) ack 2 win 8760 (DF) 
> 17:31:17.233891 eth0 > wsasa3005.asa-ehv.ce.philips.com.1181 > asaehv.ce.philips.com.www: P 2:34(32) ack 1 win 32120 (DF) 

> As you can see, when I make my first write call by sending 1 byte of
> data, it  waits until it receives the ACK and then proceed with the
> second write.

You are confusing the timing of the write() calls with the timing of
the data actually going out onto the wire.

> That means, in this case write call blocks until the server or peer
> TCP ackowledges the data.

No, it means that the TCP does not send the data until then.  It says
nothing about when the write calls complete (except, of course, that
the first write must have completed before the second write's data goes
out).

					der Mouse

			       [email-masked]
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

---

From: "Khurram Saeed" <[email-masked]>
Date: Thu, 29 Mar 2001 03:08:23 +0500

I unlisted my self from this list long ago, but I still receive mails from
this list every now and then.
May I please be removed
Thanks

----- Original Message -----
From: "der Mouse" <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>
Sent: Wednesday, March 28, 2001 6:28 PM
Subject: Re: query: using two write() calls in succession

> > 17:31:17.186250 eth0 > wsasa3005.asa-ehv.ce.philips.com.1181 >
asaehv.ce.philips.com.www: P 1:2(1) ack 1 win 32120 (DF)
> > 17:31:17.233839 eth0 < asaehv.ce.philips.com.www >
wsasa3005.asa-ehv.ce.philips.com.1181: . 1:1(0) ack 2 win 8760 (DF)
> > 17:31:17.233891 eth0 > wsasa3005.asa-ehv.ce.philips.com.1181 >
asaehv.ce.philips.com.www: P 2:34(32) ack 1 win 32120 (DF)
>      7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com