Create WebSockets between a TCP server and HTTP server in node.js
I have created a TCP server using Node.js which listens to clients connections. I need to transmit data from TCP server to HTTP server again in Node.js possibly through a Websocket ( socket.io ). However, I do not know how to create such connection such that TCP server is able to push data to HTTP server through Websocket. Many Thanks. I was trying lot of things to get this work. Most of the time I was relying on socket.io to get this working, but it was just not working with TCP. However, net.Socket suffices the purpose. Here is the working example of it. TCP Server var net = require('net');