Thanks, after some tests it seems that you are right.
One more question is readLine() called from the TcpSocket appends a terminating C character at the end of the string - '\0' ?