estiblash client connection in constructor. optimize send/receive: recognize if server closed connection.