Reputation: 21
I'm working on a project where in I've a .Net client connected to a node TCP server. This TCP server in turn needs to receive data from another node HTTP server. So, this HTTP server is receiving some data and it needs to forward it to the TCP server. And then the TCP server needs to broadcast it to all its .Net clients. I'm stuck with the data transfer part (tried using sockets, bt not quite confident about it).
say, the HTTP server is defined as:
var httpServer = http.createServer(function(req,res){
res.writeHead(200, { 'Content-type': 'text/html' });
var parsed = url.parse(req.url, true);
output = parsed.query.id;
}).listen(http_PORT);
where the variable 'output' is contrived from a URL sent from a third server. So, I need to pass this variable 'output' to a TCP server running on some other port.
Any help would be appreciated.
Regards, Abinash.
Upvotes: 2
Views: 275
Reputation: 101
You can use WCF with TCP binding for this. Http page will ping WCF service.
Upvotes: 1