Exemple #1
0
            static void HandleAcceptWebSocketResult(IAsyncResult result)
            {
                AcceptWebSocketAsyncResult thisPtr = (AcceptWebSocketAsyncResult)result.AsyncState;

                if (!thisPtr.gate.Signal())
                {
                    return;
                }

                Exception pendingException = null;

                try
                {
                    thisPtr.CompleteAcceptWebSocket(result);
                }
                catch (Exception ex)
                {
                    if (Fx.IsFatal(ex))
                    {
                        throw;
                    }

                    pendingException = ex;
                }

                thisPtr.Complete(false, pendingException);
            }
Exemple #2
0
 public void EndAcceptWebSocket(IAsyncResult result)
 {
     AcceptWebSocketAsyncResult.End(result);
 }