node.js client-socket-proxy to http response

1. socket.connect(PORT,HOST) establish socket connect (client to local tcp 
server)

2. define http server (req,res)
   from http (req,res) cycle I send data from req.url query string to the 
socket
   the socket.on('data',...) 
   or even socket.pipe(res)
   not sending the data to http response(res) ,
   until, I close the socket ???

   how the http response 'knows' that the socket is opened ?
   or I don't understand the node.js cycle

3. is there complete code sample how to deal with tcp-client-proxy to http 
response ?
    without opening/closing the socket on each (req,res) cycle ?

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/69cc731d-2673-41d3-8372-39fe40ad496e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to