Is it possible to communicate from an ASP.NET application to a node.js server?
To start with, I'd just like to be able to see the connections. I assumed that something like this would work:
Server (node.js):
var io = require('socket.io').listen(1234);
io.sockets.on('connection', function (socket)
{
console.log('connected');
socket.on('disconnect', function ()
{
console.log('disconnected');
});
});
Client (ASP.NET):
var tcpClient = new System.Net.Sockets.TcpClient();
tcpClient.Connect("localhost", 1234);
System.Threading.Thread.Sleep(1000);
tcpClient.Close();
...but I'm not having much joy. The client doesn't complain at all, but I never see 'connected' or 'disconnected' printed in node.js.
Has anyone got something like this working?