forked from AcaMate/AcaMate_API
[✨] SignalR 기능 활용한 채팅 기능 추가 중 2
This commit is contained in:
parent
2b37dc2746
commit
5d79cde27f
|
@ -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<ChatHub> _logger;
|
||||
private readonly IChatService _chatService;
|
||||
|
||||
public ChatHub(ILogger<ChatHub> logger, IChatService chatService)
|
||||
{
|
||||
_logger = logger;
|
||||
_chatService = chatService;
|
||||
}
|
||||
|
||||
|
||||
// 클라이언트에서 메시지를 보내면 모든 사용자에게 전송
|
||||
public async Task SendMessage(string user, string message)
|
||||
{
|
||||
|
|
8
Program/Services/V1/ChatService.cs
Normal file
8
Program/Services/V1/ChatService.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
using Back.Program.Services.V1.Interfaces;
|
||||
|
||||
namespace Back.Program.Services.V1;
|
||||
|
||||
public class ChatService: IChatService
|
||||
{
|
||||
|
||||
}
|
6
Program/Services/V1/Interfaces/IChatService.cs
Normal file
6
Program/Services/V1/Interfaces/IChatService.cs
Normal file
|
@ -0,0 +1,6 @@
|
|||
namespace Back.Program.Services.V1.Interfaces;
|
||||
|
||||
public interface IChatService
|
||||
{
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user