Well one common way is to send the size of the data in advance of the data.
For example, you could send a string reading
"Sending 5 bytes of data\n"
The receiver would read a line upto the...
Type: Posts; User: Salem
Well one common way is to send the size of the data in advance of the data.
For example, you could send a string reading
"Sending 5 bytes of data\n"
The receiver would read a line upto the...
The send and recv code should look something like this
// send
char buff[10000];
size_t len = strlen(buff);
char *p = buff;
ssize_t n;
while ( len > 0 && (n=send(sock,p,len,0)) > 0 ) {
p...