Skip to content

Instantly share code, notes, and snippets.

@amckinley
Created September 2, 2016 19:53
Show Gist options
  • Save amckinley/82c566bef026db9f8ef4a39952c5bedc to your computer and use it in GitHub Desktop.
Save amckinley/82c566bef026db9f8ef4a39952c5bedc to your computer and use it in GitHub Desktop.
//client.js
var io = require('socket.io-client');
var socket = io.connect('http://localhost:3000', {reconnect: true});
// Add a connect listener
socket.on('connect', function () {
console.log('Connected!');
socket.emit("test", {"data":"blob"});
});
socket.emit('CH01', 'me', 'test msg');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment