mirror of
https://github.com/ryzij/AMessanger-Server.git
synced 2026-09-18 19:25:38 +00:00
First commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace AMessanger.Core.Hubs;
|
||||
|
||||
public class ChatHub(ILogger<ChatHub> logger) : Hub
|
||||
{
|
||||
public async Task SendMessage(string user, string message)
|
||||
{
|
||||
logger.LogInformation($"{user}: {message}");
|
||||
await Clients.All.SendAsync("ReceiveMessage", user, message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user