23 lines
634 B
C#
23 lines
634 B
C#
using CommonSocketLibrary.Abstract;
|
|
using CommonSocketLibrary.Common;
|
|
using Serilog;
|
|
|
|
namespace CommonSocketLibrary.Socket.Manager
|
|
{
|
|
public class WebSocketHandlerManager : HandlerManager<WebSocketClient, IWebSocketHandler>
|
|
{
|
|
public WebSocketHandlerManager(ILogger logger) : base(logger)
|
|
{
|
|
}
|
|
|
|
protected void Add(IWebSocketHandler handler)
|
|
{
|
|
Add(handler.OperationCode, handler);
|
|
}
|
|
|
|
protected override async Task Execute<T>(WebSocketClient sender, IWebSocketHandler handler, T value)
|
|
{
|
|
await handler.Execute(sender, value);
|
|
}
|
|
}
|
|
} |