Last active
December 19, 2015 01:19
-
-
Save nchaulet/5875142 to your computer and use it in GitHub Desktop.
Generator websocket-bench
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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