I'm trying to restrict SignalR between two users. At this point in time it's ok if it's just one way connection from User A -> User B.
I'm using some of Microsoft's code and just thought I'd hard code the userId to see if I could get things working but no luck.
public void BroadcastShape(object state)
{
// No need to send anything if our model hasn't changed
if (_modelUpdated)
{
// This is how we can access the Clients property
// in a static hub method or outside of the hub entirely
var userId = "b51xx-xxxxxx-xxxxxxx-xxxxx-xxx01b";
_hubContext.Clients.User(userId).updateProduct()
// _hubContext.Clients.AllExcept(_model.LastUpdatedBy).updateShape(_model);
_modelUpdated = false;
}
}
Any tips on other methods that I need to change from this documentation would be great: https://learn.microsoft.com/en-us/aspnet/signalr/overview/getting-started/tutorial-high-frequency-realtime-with-signalr