From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Edwards To: "Trenton D. Adams" Cc: 'eCos Discussion' Subject: Re: [ECOS] TCP/IP Stack packet regrouping Date: Mon, 16 Jul 2001 17:36:00 -0000 Message-id: <20010716193646.A888@visi.com> References: <20010716173347.A11496@visi.com> <000a01c10e47$98c4dd70$090110ac@TRENT> X-SW-Source: 2001-07/msg00500.html On Mon, Jul 16, 2001 at 04:35:20PM -0600, Trenton D. Adams wrote: > > On Mon, Jul 16, 2001 at 03:44:40PM -0600, Trenton D. Adams wrote: > > > > > I'm reading the Linux documentation on send (), and it says > > > that a send () call will block if "the message does not fit > > > into the send buffer of the socket". Which tells me it that it > > > is sending the information all at once (from the programmer's > > > perspective). It also says that if it's to big to pass through > > > the underlying protocol, it will return with an error of > > > EMSGSIZE. Is this correct or not? > > > > It does appear that a write on a TCP socket under Linux will > > block until all of the data is sent -- I tried a single write() > > with block sizes up to 16MB, and it blocked until all data was > > sent. However, if a signal comes along, the write() gets > > interrupted and it returns a partial value. > > > > You mean an OS signal like SIGHUP or something? Yes. I wrote a test program that did an alarm(1) [with a handler that did a printf()/return], and then did a write(s,buf,16*1024*1024). The write returned after about 800K bytes had been written. -- Grant Edwards grante@visi.com