From 1a1c8e71fcd14858f595029f089b2d4a00202b32 Mon Sep 17 00:00:00 2001
From: ogi <Administrator@S-OGI-PC>
Date: Fri, 05 Dec 2025 09:24:16 +0900
Subject: [PATCH] プロジェクトファイルを追加。

---
 HotelPms.GrpcService/Hubs/NotifyHub.cs |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/HotelPms.GrpcService/Hubs/NotifyHub.cs b/HotelPms.GrpcService/Hubs/NotifyHub.cs
new file mode 100644
index 0000000..cb445e4
--- /dev/null
+++ b/HotelPms.GrpcService/Hubs/NotifyHub.cs
@@ -0,0 +1,27 @@
+using HotelPms.Data.Common.Dtos;
+using Microsoft.AspNetCore.SignalR;
+using System;
+using System.Threading.Tasks;
+
+namespace HotelPms.GrpcService.Hubs
+{
+    public class NotifyHub : Hub
+    {
+        public override Task OnConnectedAsync()
+        {
+            //Context.ConnectionId
+            return base.OnConnectedAsync();
+        }
+
+        public override Task OnDisconnectedAsync(Exception exception)
+        {
+            return base.OnDisconnectedAsync(exception);
+        }
+
+        public async Task SendMessage(MessageDto data)
+        {
+            data.ConnectionId = Context.ConnectionId;
+            await Clients.All.SendAsync("ReceiveMessage", data);
+        }
+    }
+}

--
Gitblit v1.10.0