tcpconn refactored