public OwinHandler(OwinApp app, IDictionary <string, object> owinCapabilities, int handlerId) { _app = app; _owinCapabilities = owinCapabilities; _handlerId = handlerId; _environment = new OwinEnvironment(this); ReqHeaders = new Dictionary <string, string[]>(StringComparer.OrdinalIgnoreCase); RespHeaders = new Dictionary <string, string[]>(StringComparer.OrdinalIgnoreCase); OnSendingHeadersAction = OnSendingHeadersMethod; _webSocketEnv = new Dictionary <string, object> { { "websocket.SendAsync", (WebSocketSendAsync)WebSocketSendAsyncMethod }, { "websocket.ReceiveAsync", (WebSocketReceiveAsync)WebSocketReceiveAsyncMethod }, { "websocket.CloseAsync", (WebSocketCloseAsync)WebSocketCloseAsyncMethod }, { "websocket.Version", "1.0" }, { "websocket.CallCancelled", null } }; DisconnectAction = () => { _disconnected = true; StartWaitingTillEndOfAppFunc(); Callback.CloseConnection(); }; }
public OwinHandler(OwinApp app, IDictionary<string, object> owinCapabilities, int handlerId) { _app = app; _owinCapabilities = owinCapabilities; _handlerId = handlerId; _environment = new OwinEnvironment(this); ReqHeaders = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase); RespHeaders = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase); OnSendingHeadersAction = OnSendingHeadersMethod; _webSocketEnv = new Dictionary<string, object> { {"websocket.SendAsync", (WebSocketSendAsync) WebSocketSendAsyncMethod}, {"websocket.ReceiveAsync", (WebSocketReceiveAsync) WebSocketReceiveAsyncMethod}, {"websocket.CloseAsync", (WebSocketCloseAsync) WebSocketCloseAsyncMethod}, {"websocket.Version", "1.0"}, {"websocket.CallCancelled", null} }; }