in reply to My server doesnt get all the data sent by the client application
readline waits for a trailing newline
A better protocol would start with the number of bytes of the message, so that you can use read until you read that number of bytes