Reputation: 13366
Is there (or will be) a way to enumerate all the available hubs (and their methods) client-side, using C# client? Haven't seen anything like that in the SignalR.Client
library, but maybe I'm missing something?
There's no problem in doing that in JS client, though, as all info is already here in the JS code.
If it's impossible so maybe there are plans on implementing such feature? Or if it cannot be done out-of-the-box, maybe there is a workaround for that?
Upvotes: 0
Views: 1194
Reputation: 887469
It's inherently impossible to enumerate client methods on the server, since the clients never send their method names to the server.
Instead, you can have the client script loop over its object and send the list of methods to the server yourself.
Upvotes: 2