Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use Socket.IO with promises?

As a part of an ongoing effort, I'm changing my current callbacks technique to promises using blue-bird promise library.

I would like to implement this technique with Socket.IO as well.

  • How can I use Socket.IO with promises instead of callbacks?
  • Is there any standard way of doing it with Socket.IO? any official solution?
like image 280
Eran Betzalel Avatar asked Feb 13 '14 23:02

Eran Betzalel


1 Answers

You might look into Q-Connection, which facilitates RPC using promises as proxies for remote objects and can use Socket.IO as a message transport.

like image 84
Kris Kowal Avatar answered Sep 24 '22 17:09

Kris Kowal