var connection = new HubConnection("http://localhost:5000/hub");
await connection.StartAsync();
connection.OnThis code sets up a handler for receiving messages from the server. When a message is received, the handler is executed with the message as its parameter. Package Library: The HubConnection class is part of the Microsoft.AspNetCore.SignalR.Client package, which is part of the ASP.NET Core framework.("ReceiveMessage", message => Console.WriteLine(message));