From 5d79cde27f1fc2f85314e07ab945b33d38717822 Mon Sep 17 00:00:00 2001 From: Seonkyu_Kim Date: Thu, 10 Apr 2025 17:55:16 +0900 Subject: [PATCH] =?UTF-8?q?[=E2=9C=A8]=20SignalR=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=ED=99=9C=EC=9A=A9=ED=95=9C=20=EC=B1=84=ED=8C=85=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80=20=EC=A4=91=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Program/Common/Chat/ChatHub.cs | 11 +++++++++++ Program/Services/V1/ChatService.cs | 8 ++++++++ Program/Services/V1/Interfaces/IChatService.cs | 6 ++++++ 3 files changed, 25 insertions(+) create mode 100644 Program/Services/V1/ChatService.cs create mode 100644 Program/Services/V1/Interfaces/IChatService.cs diff --git a/Program/Common/Chat/ChatHub.cs b/Program/Common/Chat/ChatHub.cs index 28c0e4b..138f25c 100644 --- a/Program/Common/Chat/ChatHub.cs +++ b/Program/Common/Chat/ChatHub.cs @@ -1,9 +1,20 @@ +using Back.Program.Services.V1.Interfaces; using Microsoft.AspNetCore.SignalR; namespace Back.Program.Common.Chat; public class ChatHub : Hub { + private readonly ILogger _logger; + private readonly IChatService _chatService; + + public ChatHub(ILogger logger, IChatService chatService) + { + _logger = logger; + _chatService = chatService; + } + + // 클라이언트에서 메시지를 보내면 모든 사용자에게 전송 public async Task SendMessage(string user, string message) { diff --git a/Program/Services/V1/ChatService.cs b/Program/Services/V1/ChatService.cs new file mode 100644 index 0000000..b06d1a5 --- /dev/null +++ b/Program/Services/V1/ChatService.cs @@ -0,0 +1,8 @@ +using Back.Program.Services.V1.Interfaces; + +namespace Back.Program.Services.V1; + +public class ChatService: IChatService +{ + +} \ No newline at end of file diff --git a/Program/Services/V1/Interfaces/IChatService.cs b/Program/Services/V1/Interfaces/IChatService.cs new file mode 100644 index 0000000..8959c4c --- /dev/null +++ b/Program/Services/V1/Interfaces/IChatService.cs @@ -0,0 +1,6 @@ +namespace Back.Program.Services.V1.Interfaces; + +public interface IChatService +{ + +} \ No newline at end of file