简体   繁体   中英

SignalR - enumerate available hubs and hub methods from .NET client

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM