Create method Client(string array) in IHubConnectionContext / HubContext #1789

danicomas opened this Issue Apr 2, 2013 · 5 comments


None yet
5 participants

Can you create a overload (Client or Clients) method that accept array of connectionIds?

@ghost ghost assigned halter73 and davidfowl May 22, 2013


DamianEdwards commented May 22, 2013

@davidfowl pls add some implementation guidance here.


davidfowl commented May 22, 2013

One reason for this change would be to optimize the fact that we create a new message object for each topic we're publishing to but that's hard today since Message has Key (which is the signalr) on it. The good news is that it looks like it's not used for any other reason that looking the topic up. So it would be a breaking change to do it.

Implementation Details

We need 2 levels of API changes. One for the PersistentConnection level and one for the Hubs level.

We need to change Signal to list of Signals. This way we can serialize a message once and send call publish multiple times in Connection.
This has a cascading effect:

Everywhere that takes a single Signal has to take multiple signals now. Once this is done it should be trivial to add Clients(array) and it will be much more efficient as we'll be using the same message instance in each topic.

@ghost ghost assigned halter73 May 22, 2013


davidfowl commented Jun 20, 2013

Moving to post 2.0

@ghost ghost assigned davidfowl Jul 19, 2013

davidfowl added a commit that referenced this issue Jul 19, 2013

Initial changes to support sending to multiple signals in one go.
- Added Signals everywhere there was Signal
- Added MultipleSignalProxy which is a client proxy for sending to multiple signals.
- Redesigned how we pass state to proxies.
- Cleaned up duplication for the HubConnectionContext by introducing HubConnectionContextBase
- Added Clients and Groups methods to IHubConnectionContext


@ghost ghost assigned Xiaohongt Jul 20, 2013


DamianEdwards commented Jul 20, 2013

Can we get this change up and running on JabbR ASAP so we get some real world coverage?

davidfowl added a commit that referenced this issue Jul 22, 2013


Xiaohongt commented Jul 24, 2013

verified hub connection /persistent connection /HubContext /ConnectionContext for send message to multiple connections and groups

@Xiaohongt Xiaohongt closed this Jul 24, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment