Created
November 17, 2019 14:42
-
-
Save abhikhatri/c57e38445f80eab165dca0578ce2852e to your computer and use it in GitHub Desktop.
function to listen to all socket io events
This file contains 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
var onevent = socket.onevent; | |
socket.onevent = function (packet) { | |
var args = packet.data || []; | |
onevent.call(this, packet); | |
console.log('packet', packet.data); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment