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


_______________________________________________
Bug-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/bug-cvs

Reply via email to