Created
December 27, 2022 00:43
-
-
Save devmobasa/fda538a5ee2168e08fb13a182f78d037 to your computer and use it in GitHub Desktop.
SignalR ChatHub to talk to the clients
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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