Re: recv() - How do you know the length of buffer that you are going
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Re: recv() - How do you know the length of buffer that you are going




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: recv() - How do you know the length of buffer that you are going  
Nils O. Selåsdal


Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:08 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register