[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows CVS Latest + Patch - "version" Command

From: Larry Jones
Subject: Re: Windows CVS Latest + Patch - "version" Command
Date: Sun, 25 Sep 2005 16:12:09 -0400 (EDT)

Conrad T. Pino writes:
> This part is not needed if the "recv" function *never* returns a value
> greater than it's "size" argument.
> Can we trust "recv" function on *all* platforms to do so?

That's an interesting question.  According to POSIX, it depends on
whether the socket is stream based or message based.  For stream-based
sockets (which is what we're expecting), it appears that that is true. 
For message-based sockets (which we're not expecting), recv is required
to return the length of the message, even if it's longer than "size"
(the extra bytes are discarded). 

-Larry Jones

Life's a lot more fun when you're not responsible for your actions. -- Calvin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]