LittleFunny
LittleFunny

Reputation: 8385

Do I need node.js to listen to socket.io request's?

I am reading some information about socket.io and node.js. The problem is that the stable version for node.js is run on linux but my server isn't a linux machine and may not be able to run cygwin.exe to run the node.js.

Is it possible to use asp.net server to create a socket and listen to the socket.io?

Upvotes: 2

Views: 541

Answers (1)

Benjamin Atkin
Benjamin Atkin

Reputation: 14725

No. socket.io-client is backend-agnostic (it uses node.js to build and test it, but the repo has a dist directory). It doesn't even require WebSockets or Flash Sockets, though they make performance better.

Unfortunately I couldn't find a backend for ASP.net that's already built. I did find this one for Django, though: http://pypi.python.org/pypi/django-socketio/

Here is the connection code: https://github.com/stephenmcd/django-socketio/blob/master/django_socketio/views.py It seems to only support XHR polling.

So, it will be a lot more work. I think it would be a lot easier to set up communication between node.js and ASP.net and use node.js to communicate with browsers.

Edit: I found a Java socket.io server that supports more protocols. It's based on netty, which runs on windows. https://github.com/ibdknox/socket.io-netty

Upvotes: 2

Related Questions