Replace websocket with socket.io?

Started by coolspeed, June 19, 2015, 01:42:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

coolspeed

Quote from: xeroc on June 19, 2015, 07:30:18 AM
Websocket is the technology and socket.io an implementation AFAIK

"Socket.IO primarily uses the WebSocket protocol with polling as a fallback option,[2] while providing the same interface. Although it can be used as simply a wrapper for WebSocket, it provides many more features, including broadcasting to multiple sockets, storing data associated with each client, and asynchronous I/O.

Advantages

Socket.IO handles the connection transparently. It will automatically upgrade to WebSocket if possible. This requires the programmer to only have Socket.IO knowledge.

Disadvantages

Socket.IO is not a WebSocket library with fallback options to other realtime protocols. It is a custom realtime transport protocol implementation on top of other realtime protocols. Its protocol negotiation parts cause a client supporting standard WebSocket to not being able to contact a Socket.IO server. And a Socket.IO implementing client cannot talk to a non-Socket.IO based WebSocket or Long Polling Comet server. Therefore Socket.IO requires using the Socket.IO libraries on both client and server side."
Please vote for  delegate.coolspeed    dac.coolspeed
BTS account: coolspeed
Sina Weibo:@coolspeed

xeroc

Websocket is the technology and socket.io an implementation AFAIK

xeroc

Quote frrom wp:
" Socket.IO primarily uses the WebSocket protocol"

coolspeed

#1
Go to Can I Use, and try to search "websocket":
http://caniuse.com/#search=websocket

What is socket.io?
https://en.wikipedia.org/wiki/Socket.IO
Please vote for  delegate.coolspeed    dac.coolspeed
BTS account: coolspeed
Sina Weibo:@coolspeed