Skip to content

Instantly share code, notes, and snippets.

@Ibro
Created December 27, 2022 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ibro/fda538a5ee2168e08fb13a182f78d037 to your computer and use it in GitHub Desktop.
Save Ibro/fda538a5ee2168e08fb13a182f78d037 to your computer and use it in GitHub Desktop.
SignalR ChatHub to talk to the clients
using Microsoft.AspNetCore.SignalR;
namespace BlazorSignalRChat;
// We're creating a Chat Hub - Hub is a SignalR class
// This class will be used to send messages to the client
// and receive messages from the client
public class ChatHub : Hub
{
// We will create a constant to be used from the client (Blazor page)
// And from the Server (ASP.NET Core Middleware).
public const string HubUrl = "/ChatHub";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment