This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: TCP/IP Stack packet regrouping
- To: "Trenton D. Adams" <tadams at extremeeng dot com>
- Subject: Re: [ECOS] TCP/IP Stack packet regrouping
- From: Grant Edwards <grante at visi dot com>
- Date: Mon, 16 Jul 2001 19:36:47 -0500
- Cc: 'eCos Discussion' <ecos-discuss at sourceware dot cygnus dot com>
- References: <20010716173347.A11496@visi.com> <000a01c10e47$98c4dd70$090110ac@TRENT>
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