Extended TCPprotocol and added socket.io listeners to main