4 ms·
You could also just use Primus which exposes a Stream compatible wrapper by default for the client and server. https://github.com/primus/primus https://github.
by V1 12y ago
You could also just use Primus which exposes a Stream compatible wrapper by default for the client and server.
https://github.com/primus/primus https://github.com/primus/primus
(Primus uses engine.io,sockjs,browserchannel,websockets internally so you're no longer locked into a specific framework)
- EGreg 12y agosomeone should do primus vs socket.io why would I need engine.io,websockets for example when engine.io already uses websockets if it can upgrade the connection to them?
- lpinca 12y agoYou can't use both. In Primus you can select only one transformer, listed above by V1, but if something doesn't work, you can just switch it with a single line of code. No rewrites, no need to learn a new API.
- EGreg 12y agoI know you can't use both, but doesn't engine.io already support websockets?
- lpinca 12y agoYes it does, but if you are building something that works perfectly only using websockets (e.g. a command-line utility), why would you use engine.io? You can tell engine.io to only use websockets, but what's the point if you can use websockets directly and have the same API?