public void Accept(
     OwinWebSocketParameters parameters,
     Func<OwinWebSocket, Task> callback)
 {
     var accept = AcceptDelegate;
     if (accept == null)
     {
         throw new NotSupportedException(OwinConstants.WebSocket.Accept);
     }
     accept.Invoke(
         parameters.Dictionary,
         webSocket => callback(new OwinWebSocket(webSocket)));
 }
示例#2
0
        public void Accept(
            OwinWebSocketParameters parameters,
            Func <OwinWebSocket, Task> callback)
        {
            var accept = AcceptDelegate;

            if (accept == null)
            {
                throw new NotSupportedException(OwinConstants.WebSocket.Accept);
            }
            accept.Invoke(
                parameters.Dictionary,
                webSocket => callback(new OwinWebSocket(webSocket)));
        }
 public bool Equals(OwinWebSocketParameters other)
 {
     return(Equals(_dictionary, other._dictionary));
 }
示例#4
0
 public void Accept(
     Func <OwinWebSocket, Task> callback)
 {
     Accept(OwinWebSocketParameters.Create(), callback);
 }
示例#5
0
 public void Accept(
     string subProtocol,
     Func <OwinWebSocket, Task> callback)
 {
     Accept(OwinWebSocketParameters.Create(subProtocol), callback);
 }