Update to support TCP sockets