I have signalR Hub:
public class ServerHub : Hub
{
public void AnnounceIncomingCall(string name, string message)
{
return;
}
public bool ExecuteCall(Guid callId, int from, int to)
{
return false;
}
}
Is there any way to resolve Client
/ Connection
that called remotely method ExecuteCall
? I would like to do this inside this method to answer exaclty to Client
that have broadcasted the call.
I'm looking for something like Clients.Current
?
您可能想看看Context.ConnectionId
和本文: https : //docs.microsoft.com/zh-cn/aspnet/signalr/overview/guide-to-the-api/hubs-api-guide-server
You can use the Clients.Caller
property to get hold of the calling client. For more information, see IHubCallerConnectionContext.Caller documentation.
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.