Well, you didn't read the post apparently and only a title :(
We really need to stop reinventing the wheel
That is to say, if you need a TCP connection to any server, you probably should not be implementing it over HTTP (well, this is where definitions get difficult, since you know, HTTP is technically TCP. Fuck)
Pub/sub is well catered for by socket.io (websockets).
This glue belongs on the server.
If I did need arbitrary TCP connections my first thought would be a websocket proxy...