socketstream/socketstream — Issue #166: An ability to unsubscribe a user from a channel
Author: nponeccop
Created: 2012-02-28 20:43:56+00:00
State: open

It is possible to send events to a `userId`. Is it possible to subscribe/unsubscribe a user?

Use case: consider my TV example from #157. If a user's subscription has expired, it must stop watching paid channels immediately. So a server, on a cron event, checks user database for expired accounts, and calls something like `ss.unsubscribeUser(userId, channel_name)` for each account which expired since the previous check.

Socketstream then finds all sessions of a user and unsubscribes them from the listed channels.