modify TcpConnection class