How do i map user connection and user id in signalr so that i can send a message to a specific user
问题 I want to send a private message to a user, i have created a hub but unfortunately i have no idea how to do it in signalr core, the documentation also doesn't have any article in it. 回答1: How do i map user connection and user id in signalr so that i can send a message to a specific user To achieve above requirement, please refer to the following example. ChatHub class: public class ChatHub : Hub { public static List<KeyValuePair<string, string>> ConnectedIds = new List<KeyValuePair<string,