Hi,
I a reading line by line from a file and sending it over a TCP connection to a destination.
However at the receiver i a m receiving multiple lines because of the extra space in the buffer.
SENDER:
while(fgets(name,70,fp)!=NULL) //sending one line at a time
{
printf("%s frame sent\n",name);
c=send(s,name,strlen(name),0);
}
AT THE RECEIVER:
.
.
.
len=recv(i,buf,70,0);(keeps looping as long as there is data to be received)
I am receiving multiple lines at the same time due to the excess buffer capacity.
How do i receive what is been sent at a time?
Sritej