Skip to content

Instantly share code, notes, and snippets.

@mecab
Last active December 29, 2015 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mecab/7740345 to your computer and use it in GitHub Desktop.
Save mecab/7740345 to your computer and use it in GitHub Desktop.
RxJS and Socket.io
var emit = Rx.Observable
.fromNodeCallback(that.socket.emit,
null,
that.socket); // Socket.io needs the socket as the context to handle ack.
emit.subscribe(function() {
// ...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment