I am using SignalR in my ASP.NET web application. Here I am calling client from outside to hub class using IHubContext
. I need to get the current user's connection ID in order to send messages to the current user only. How can I get the connection ID on the client side?
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- Using :remote => true with hover event
- How to store image outside of the website's ro
- Is there a way to play audio on a mobile browser w
- 'System.Threading.ThreadAbortException' in
There's another way also, you can get connection id into your controller from hub by invoking a method of
hub
and you can return the requiredID
from there.Controller Code
Code inside Hub