public OwinWebSocket(IDictionary<string,object> owinEnvironment) { mSendAsync = (WebSocketSendAsync)owinEnvironment["websocket.SendAsync"]; mReceiveAsync = (WebSocketReceiveAsync)owinEnvironment["websocket.ReceiveAsync"]; mCloseAsync = (WebSocketCloseAsync)owinEnvironment["websocket.CloseAsync"]; mSendQueue = new TaskQueue(); }
public OwinWebSocketAdapter(IDictionary<string, object> websocketContext, string subProtocol) { _websocketContext = websocketContext; _sendAsync = (WebSocketSendAsync)websocketContext[OwinConstants.WebSocket.SendAsync]; _receiveAsync = (WebSocketReceiveAsync)websocketContext[OwinConstants.WebSocket.ReceiveAsync]; _closeAsync = (WebSocketCloseAsync)websocketContext[OwinConstants.WebSocket.CloseAsync]; _state = WebSocketState.Open; _subProtocol = subProtocol; }
public OwinWebSocket(IDictionary<string, object> env) { _sendAsync = (WebSocketSendAsync)env[WebSocketConstants.WebSocketSendAsyncKey]; _receiveAsync = (WebSocketReceiveAsync)env[WebSocketConstants.WebSocketReceiveAyncKey]; _closeAsync = (WebSocketCloseAsync)env[WebSocketConstants.WebSocketCloseAsyncKey]; }
public OwinWebSocket(IDictionary <string, object> env) { _sendAsync = (WebSocketSendAsync)env[WebSocketConstants.WebSocketSendAsyncKey]; _receiveAsync = (WebSocketReceiveAsync)env[WebSocketConstants.WebSocketReceiveAyncKey]; _closeAsync = (WebSocketCloseAsync)env[WebSocketConstants.WebSocketCloseAsyncKey]; }
private int messageType; // 0x1 for Text, 0x2 for binary public BinaryStream(WebSocketSendAsync sendAsync, WebSocketReceiveAsync receiveAsync, WebSocketCloseAsync closeAsync, int messageType) { this.sendAsync = sendAsync; this.receiveAsync = receiveAsync; this.closeAsync = closeAsync; this.messageType = messageType; }