Last post Jun 23, 2016 07:43 AM by Fei Han - MSFT
Jun 22, 2016 06:28 AM|thusithagh|LINK
I have two clients connecting to one hub using SignalR.
My requirement is as follows:
Client A has made a connection with the hub.
A request comes to the hub from Client B, and that request needs to be sent to Client A from the hub.
And a response needs to be returned from Client A to the hub and that response needs to be sent back to Client B.
All this needs to happen synchronously.
Is it possible to achieve this?
Thank you in advance.
Jun 23, 2016 07:43 AM|Fei Han - MSFT|LINK
Welcome to ASP.NET forum.
Each client connecting to a hub passes a unique connection id, if you’d like to broadcast message between two clients (one-to-one), you could refer to the following sample code to send a message to a specific user.
public class MyHub : Hub
public void Send(string userId, string message)