Use shared_ptr for tcp_connections.