Events |
---|
onConnect |
onMessage |
Fires on socket connection.
Parameters: Socket
Example:
function onConnect(socket) {
// Do something...
}
module.exports = { onConnect };
Fires on message receive.
Parameters: Message
Example:
function onMessage(message) {
// Do something...
}
module.exports = { onMessage };