Skip to content

Instantly share code, notes, and snippets.

@crodgers
Last active April 27, 2016 14:45
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 crodgers/79630b71bdd23902a75924b7ba894568 to your computer and use it in GitHub Desktop.
Save crodgers/79630b71bdd23902a75924b7ba894568 to your computer and use it in GitHub Desktop.
Connecting to the real time API using socket.io
socket = require(socket.io-client)("https://ggs.online-go.com");
// connect to the socket for live challenges being posted
// will return a list of currently active challenges
socket.emit("seek_graph/connect", {channel:"global"});
//listen for new challenges being posted, or challenges being accepted
socket.on("seek_graph/global", function(event){});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment