[tcpserver] Updated to new sockets API