Created
November 25, 2014 21:16
-
-
Save kevinswiber/9f1a22efd499099537a0 to your computer and use it in GitHub Desktop.
Add a spy to Zetta for logging out new WebSocket event subscriptions.
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
| module.exports = function(server) { | |
| var original = server.httpServer.setupEventSocket; | |
| server.httpServer.setupEventSocket = function(ws) { | |
| console.log('Subscribing to URL:', ws.upgradeReq.url); | |
| original.call(server.httpServer, ws); | |
| }; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment