Home > other >  How to send Message only Two user in SignalR
How to send Message only Two user in SignalR

Time:08-03

I want when I send message to one another two will got that message like signalR groups but I doesn't use group I do this thing without group

Please Anyone can tell how to do that

CodePudding user response:

You could try

public async Task SendMessage(string user, string message)
        {
            var a = Context.UserIdentifier;
            await Clients.Others.SendAsync("ReceiveMessage", user, message);
        }

I tried with the codes in this enter image description here

Send message to specific message you could check this ducument:

  • Related