Calling SignalR hub clients from elsewhere in system

后端 未结 5 992
情书的邮戳
情书的邮戳 2020-12-07 12:06

I\'ve set up a SignalR hub to communicate between the server and client. The hub server side code is stored in a class called Hooking.cs. What I want is to be able to call a

5条回答
  •  有刺的猬
    2020-12-07 12:48

    Have a look at how it's done in Chat.cs in SignalR.Samples.Hubs.Chat from https://github.com/SignalR/SignalR.

    I can see in there that static Dictionary's are being instantiated at the top, so I imagine they are being maintained persistently too, either with the Chat class being a persisted instance (?) or that array being updated somehow.

    Check it out, David Fowler would probably be the best on this.

提交回复
热议问题