Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Client-side
io.connect({
forceNew: true,
transports: [ 'websocket' ]
});
// Server-side
var io = require('socket.io');
var app = require('express')();
var server = require('http').createServer(app);
io(server, {
transports: [ 'websocket' ],
pingInterval: 1e4
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment