bridge the communication between a tcp server and websocket client