Add method to send progress updates to caller
Introduced a `SendProgressUpdate` method in `WeatherUpdateHub` to allow sending progress messages specifically to the calling client. This enhances client feedback during operations.
This commit is contained in:
@@ -10,5 +10,11 @@ namespace Api.SignalR
|
||||
// Broadcast the message to all connected clients.
|
||||
await Clients.All.SendAsync("ReceiveMessage", user, message);
|
||||
}
|
||||
|
||||
public async Task SendProgressUpdate(string message)
|
||||
{
|
||||
// Send a message to the caller.
|
||||
await Clients.Caller.SendAsync("ProgressUpdate", message);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user