Quote Originally Posted by Validimir_verekno View Post
actually i have a text file.client must send line by line of file to server and server must process line by line of data but client packet many of line and then send to server.
as result server recive many of line and wrong process .
How does the client (sender) know when the server (receiver) is done processing the last line it received? This is the protocol that Christian Ehrlicher is talking about.

The client is essentially a state machine that switches between:
  1. Send a line
  2. Wait for signal of completion from server (receive) then go to 1.