I'm new in node.js So the question can be quite naive.
I want to use node.js as a proxy between the javascript client and a windows program which has a API working through a defined port. So browser sends HTTP request to node.js. Node.js opens connection with the windows program, sends request, get a respons and returns the response to the javascript that called node.js ( AJAX )
Actually it has been realized so and works. The problem is that windows program wants to work persistent. So once the connection is opened it should stay alive.
And my node.js script opens connection. And the next call to node.js try to open connection again. And that leads to error.
So the question - what is the right way and middles to reuse the TCP connection in node.js. So that next call won't open new connection but go on with already opened one.