public override async Task OnConnected(WebSocket socket) { await base.OnConnected(socket); var socketId = WebSocketConnectionManager.GetId(socket); await SendMessageToAllAsync($"{socketId} is now connected"); }
/// <summary> /// コンストラクタ /// </summary> /// <param name="webSocketConnectionManager">コネクションマネージャ</param> /// <param name="logger">ロガー</param> public WebSocketHandler(WebSocketConnectionManager webSocketConnectionManager, ILogger <WebSocketHandler> logger) { WebSocketConnectionManager = webSocketConnectionManager; _logger = logger; }
/// <summary> /// コンストラクタ /// </summary> /// <param name="webSocketConnectionManager">コネクションマネージャ</param> public WebSocketHandler(WebSocketConnectionManager webSocketConnectionManager) { WebSocketConnectionManager = webSocketConnectionManager; }
public TestMessageHandler(WebSocketConnectionManager webSocketConnectionManager) : base(webSocketConnectionManager) { }