From c0b2b1a8872f2ea16b5bc697c4340880f3b60f00 Mon Sep 17 00:00:00 2001 From: GarryOne Date: Sat, 25 Jul 2015 03:25:12 +0300 Subject: [PATCH] Added support for online/offline status of users --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 6442626..25d76d4 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,18 @@ app.BrainSocket.Event.listen('app.error',function(msg) { console.log(msg); }); + +app.BrainSocket.Event.listen('showOnline',function(data) { + console.log(data); +}); + +app.BrainSocket.Event.listen('someone_connected',function(data) { + console.log(data); +}); + +app.BrainSocket.Event.listen('someone_disconnected',function(data) { + console.log(data); +}); ``` **Note:** The `msg` parameter passed into the event listener is a POJO (Plain Old Javascript Object) that contains `client` and possibly `server` objects (also POJOs), which contain the original client data and any server data that was passed back.