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: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Mon, 16 Jul 2001 21:20:05 +0100
- Cc: eCos Discussion <ecos-discuss at sourceware dot cygnus dot com>
- Organization: Red Hat UK Ltd.
- References: <000101c10e30$c46ecf60$090110ac@TRENT>
"Trenton D. Adams" wrote:
>
> I'm curious as to what happens if I send 30K worth of data in one send?
> Will it all send at one time?
Not necessarily - it may depend on window size negotiation, fragmentation,
MTUs etc. It _may_ send all at one time, but I wouldn't rely on it.
At a high level it will all send, yes.
> What happens if I receive 30K of data, will it receive all 30K at one
> time?
If you are sure that a single 30K TCP packet has been received, then yes,
you should. But it's probably not portable to rely on it, and it's very
difficult to be sure you would have received a single 30K packet.
> If not, in blocking mode it will most likely appear to happen all at one
> time right?
Not necessarily. read() can return early if _some_ data is available.
> In non blocking mode will I have to do a loop until all the data has
> been sent/received while adjusting the buffer pointer?
Yes.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions http://www.redhat-techworld.com/