For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > April 2007 > Sending and Receiving over socket









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Sending and Receiving over socket
Jack

2007-04-14, 10:06 pm

Hi Everyone,
I have a question. If I have a client and a server machine and on my
client machine I execute this code:

send (socketfd, &rHeader, 2 * sizeof(int)), 0);

and on my server machine I execute:

recv (socketfd, &buffer, 2 * sizeof*(int)), 0);

can I be sure that the full buffer will be sent and received when
these two are executed. If not is there a way to make sure that these
two I done. I guess I am looking for a function like fflush() but for
sockets.

Thanks

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com