Add support for custom data when returning a list of all socket clients#154
Closed
connected-yzhang wants to merge 2 commits intomasterfrom
unknown repository
Closed
Add support for custom data when returning a list of all socket clients#154connected-yzhang wants to merge 2 commits intomasterfrom unknown repository
connected-yzhang wants to merge 2 commits intomasterfrom
unknown repository
Conversation
Add support for custom data when returning a list of all socket clients
Member
|
Hi! Could you please rebase against master (most notably after #146)? How about adding a new var requestTypes = {
clients: 0,
clientRooms: 1,
allRooms: 2, // list of all rooms created on every node
remoteJoin: 3, // make any socket.id join a given room
remoteLeave: 4, // make any socket.id leave a given room
customRequest: 5, // using your registered hook
}; |
Author
|
@darrachequesne Hi thanks for the quick look-at. We're just trying to initiate a discussion to see if this is a change that you think is worth making, has a reasonable demand and is inline with where you envisioned the socket.io-redis adapter to go. If so, we're more than happy to rebase against the current master. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have a use case when a new client connects to a socket.io server, it would like to know all the clients that are in a particular room, and some metadata of the clients on the other side. So we implemented a custom hook function that enables the consumer of the 'clients' call on the adapter to implement custom callback to fetch client metadata in addition to the clientIDs.