referring to https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-signalr-service-output?tabs=in-process&pivots=programming-language-csharp#send-to-a-user this is the code to send a message to a specific user:
[FunctionName("SendMessage")]
public static Task SendMessage([HttpTrigger(AuthorizationLevel.Anonymous, "post")]
object message
[SignalR(HubName = "chat")]
IAsyncCollector<SignalRMessage> signalRMessages)
{
return signalRMessages.AddAsync(
new SignalRMessage
{
// the message will only be sent to this user ID
UserId = "userId1",
Target = "newMessage",
Arguments = new [] { message }
});
}
however, how is the message actually sent to a userId1
.? how is this configured on the client side so that it is sent to userId1
.? does anything have to setup in the negotiate
method.?