I'm implementing a simple connection between a client and a server in C. In client side, I'm in a loop, reading from a file; every time BUFFER_SIZE bytes and sending it to the server side (didn't upload error handling).
//client side
bytesNumInput = read(inputFileFD,bufInput,BUFFER_SIZE)
bytesSend = write(sockfd,bufInput,bytesNumInput)
Of course the server is also in a loop.
//server side
bytesRecv = read(sockfd,bufOutput,bytesNumInput)
Now, my questions are: