Possible for WebSocket client on browser to talk to TCP Socket server?

jaffa picture jaffa · Mar 1, 2013 · Viewed 9.7k times · Source

Is it possible to have a TCP Socket server running which accepts incoming connections from WebSocket clients? I have a TCP Socket server and I'd like to be able to test this in a browser. Is this possible?

Answer

kanaka picture kanaka · Mar 1, 2013

Absolutely! That is the purpose of websockify.

Of course your WebSocket client application will need to be able to implement the protocol of the TCP server. For example, noVNC is a browser VNC client that implements the RFB protocol and by using websockify it can connect to a normal TCP based VNC server.

Disclaimer: I created both websockify and noVNC