IonicaBizau/web-sockets — pull request #1 by gabipetrovay (2013-11-06 19:11:28+00:00)
Title: Implemented direct messaged from server modules to client

Now, there is no more necessity for `listen.js` on the server to be aware of the server web socket emits. Everything goes through the `sockets.send` which must receive an object of the following form:

```
{
// communication can be: to a single "client", to a "session", to a "group", or to "all" connected clients
type: 'session',
// recipient of this event (depends on the type)
dest: 'dfsf4434iuh34uih' // e.g. a session ID
// the event is the one the client code needs to be aware of
event: 'myEvent',
// and here you can send the entire world (received on the client
// as first parameter in the socket listener for this event)
data: {
hello: "world"
}
}
```

After you merge this you can update the app to use again your module (I temporarily switched to mine)