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:
> 
>   >
>   > > 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.
> 
> Are you saying that read () will return if ONLY some of the data is
> there, but will complete successfully if it's all there?

read() can return if some or all of the data is there. In both cases it
will return the number of bytes actually read.
 
> So, to summarize what you said.
> 
> Sending generally will send it all at once, and there's no need for a
> loop for the outgoing buffer?

Yes.

> Receiving I should always do the loop just in case?

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]