add TcpConnection functions