Author Topic: Replace websocket with socket.io?  (Read 342 times)

0 Members and 1 Guest are viewing this topic.

Offline coolspeed

  • Hero Member
  • *****
  • Posts: 536
    • View Profile
    • My Blog
Replace websocket with socket.io?
« on: June 19, 2015, 01:42:36 am »
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
« Last Edit: June 19, 2015, 01:45:09 am by coolspeed »
Please vote for  delegate.coolspeed    dac.coolspeed
BTS account: coolspeed
Sina Weibo:@coolspeed

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12523
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Replace websocket with socket.io?
« Reply #1 on: June 19, 2015, 07:29:42 am »
Quote frrom wp:
" Socket.IO primarily uses the WebSocket protocol"
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12523
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Replace websocket with socket.io?
« Reply #2 on: June 19, 2015, 07:30:18 am »
Websocket is the technology and socket.io an implementation AFAIK
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline coolspeed

  • Hero Member
  • *****
  • Posts: 536
    • View Profile
    • My Blog
Re: Replace websocket with socket.io?
« Reply #3 on: June 19, 2015, 01:39:25 pm »
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