Skip to content

Adds MIDDLEWARE_UNSUBSCRIBE handler#13

Closed
robzsk wants to merge 2 commits into
SocketCluster:masterfrom
robzsk:master
Closed

Adds MIDDLEWARE_UNSUBSCRIBE handler#13
robzsk wants to merge 2 commits into
SocketCluster:masterfrom
robzsk:master

Conversation

@robzsk

@robzsk robzsk commented Dec 30, 2016

Copy link
Copy Markdown

I'm using the MIDDLEWARE_SUBSCRIBE event to send messages such as "player x has joined the conversation". However, there is currently no way to send "player x has left the conversation" using middleware in the same manner.
MIDDLEWARE_UNSUBSCRIBE does not allow for blocking, but instead prints a warning when blocking is attempted by the consuming implementation i.e. next(true); will not block the unsubscribe.

@robzsk

robzsk commented Dec 31, 2016

Copy link
Copy Markdown
Author

Use socket.on('unsubscribe', function (channel) {}); instead.

@robzsk robzsk closed this Dec 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant