开发者

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开发者_JAVA技巧.exe to run the node.js.

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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜