Re: Variable Length Packets
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 02/09/04
- Next message: Barry Margolin: "Re: errno 13"
- Previous message: Marcia Hon: "Re: errno 13"
- In reply to: Måns Rullgård: "Re: Variable Length Packets"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 09 Feb 2004 02:38:25 GMT
In article <yw1x1xp5qgmn.fsf@kth.se>, mru@kth.se (Måns Rullgård) wrote:
> Barry Margolin <barmar@alum.mit.edu> writes:
>
> > If you're using UDP, the behavior if your buffer isn't big enough
> > isn't specified. Some implementations will return the rest of the
> > packet in a subsequence call to read(),
>
> Is that right? How does the application determine packet boundaries
> in those cases?
You're expected to know the maximum size of the packet that can be sent
in the particular application protocol, and make your buffer big enough.
A call to read() will never return more than one datagram, so you don't
have to worry about packets getting combined.
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Next message: Barry Margolin: "Re: errno 13"
- Previous message: Marcia Hon: "Re: errno 13"
- In reply to: Måns Rullgård: "Re: Variable Length Packets"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|