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


"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/


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