send/recv socket call
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 > send/recv socket call




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

    send/recv socket call  
DJP


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-03-04 02:13 AM

Hi,

I was just trying to understand the send/recv socket calls. Does a send call
block if the receiver hasn't executed a recv for the number of bytes that a
sender is sending? For example if A sends 50 bytes to B and the code in B
just does a recv for 10, what exactly is going to happen? (I am using TCP
SOCK_STREAM) Does A just pretend that all the byes were sent or does it
block until the receiver receives all the bytes.

I am basically trying to get at the logic that I should be building into my
receiver. If I do not know how much data I am going to receive. What is the
logic I should use at the receiver in determining how many bytes to recv or
read from the byte stream?

I hope someone can help me with this. Thanks a lot!







[ Post a follow-up to this message ]



    Re: send/recv socket call  
Barry Margolin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-03-04 02:13 AM

In article <cjj72o$n1u$1@gist.usc.edu>,
"DJP" <dominicjoseph@rediffmail.com> wrote:

> Hi,
>
> I was just trying to understand the send/recv socket calls.

I just answered this in another newsgroup -- please don't multipost.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:19 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