migrated from a native TCP socket to a WebSocket for better support for browser based clients