12-19-05 11:02 PM
Dale Hagglund wrote:
> Steven> So at the recv() end, the first recv() will receive the
> Steven> number of bytes from the first send()? So that the 2nd
> Steven> recv() will be the retrieval of the actual message?
>
> No. Recv() does not know *anything* about how many times send() was
> called on the other end.
Just to not confuse the original poster, or perhaps to bring further
confusion ;-) the above is true for TCP, and other protocols that
presents an octet stream to the application.
For message based protocols, such as UDP or SCTP(initialized in the
proper mode for messaging) one recv DOES match one send at the other
end. Same applies, you have to have an application protocol so you
know what you're doing, ofcourse.
[ Post a follow-up to this message ]
|