This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: TCP/IP Stack packet regrouping


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]