js-bao-wss-client / ChannelSubscription
Interface: ChannelSubscription
A live channel membership, returned by JsBaoClient.subscribeToChannel.
expiresAt is epoch milliseconds and is the membership's whole lifetime: expiry is the only revocation a channel grant has, so past it the server stops delivering even though this socket stays open. Renewing means asking the authorizing function for another grant and subscribing again — which replaces this membership rather than adding one.
Properties
channel
channel:
string
expiresAt
expiresAt:
number
unsubscribe
unsubscribe: () =>
void
Leave the channel. Idempotent.
Returns
void