calling the Caller method in SignalR hub outside the hub context

╄→尐↘猪︶ㄣ 提交于 2019-12-05 09:31:28

Outside of the hub, there obviously is no caller because the server is the one who initiates.

If you are worried about unique user names, you'll need to implement a custom IUserIdProvider, or you need to manage connection ids per user in some other way. Then you could call

context.Clients.Client(connectionId).reportProgress();

which would be unique.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!