如何让SignalR用户连接ID了侧轮毂类?轮毂、用户、SignalR、ID

2023-09-11 01:18:23 作者:伤ソ就这样期待着多喝几杯

我在我的ASP点NET Web应用程序使用信号r。在这里,我使用IHubContext调用的客户端从外到HUB类。我需要获得当前userconnection ID,以便将消息发送到当前被叫用户我only.How可以得到它?

Hi I am using Signal R in my asp dot net web application. Here I am calling client from outside to hub class using IHubContext. I need to get current userconnection id in order to send message to current called user only.How can I get it?

推荐答案

是的。您可以使用 $。connection.hub.id