Hi;
I want to be able to send multiple writes over a socket and be able to read the multiple data. Now i can write the data no problem but when i read it, it seems to get messed up, and i put an counter in the loop and its value is 7 even though i only send 4 pieces of info over, here is the code
Code://cleint while(fgets(line, sizeof line, fp) ) write(sockfd, line, strlen(line)+1)); //server while(read(new_fd, buffer, strlen(buffer) ) printf("%s\n", buffer);
Any ideas?
Thanks