Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down