socketstream/socketstream — Issue #164: Channels are undocumented
Author: nponeccop
Created: 2012-02-28 13:25:40+00:00
State: open

Here is some preliminary documentation:

# Channels

Channels allow to broadcast events only to the clients subscribed to a channel. There are three operations:

Subscribe a session to a channel:

```Javascript
session.channel.subscribe(channel_name)
```

Unsubscribe a session from a channel:

```Javascript
session.channel.unsubscribe(channel_name)
```

Broadcast an event to a channel:

```Javascript
ss.api.publish.channels(channel_name, event_name, object_to_send)
```

Client event handlers receive all events with a given name. It doesn't matter what channel was used to send the event.