Skip to content

Instantly share code, notes, and snippets.

@nchaulet
Last active December 19, 2015 01:19
Show Gist options
  • Save nchaulet/5875142 to your computer and use it in GitHub Desktop.
Save nchaulet/5875142 to your computer and use it in GitHub Desktop.
Generator websocket-bench
(function() {
exports.beforeConnect = function(client) {
// On ne veut pas que les clients utilisent de websocket
client.disable('websocket');
};
exports.onConnect = function(client, done) {
// On se connecte à un channel faye
var sub = client.subscribe('/timeline-23', function(message) { });
sub.callback(done);
sub.errback(done);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment