IsValid() public static method

public static IsValid ( WebSocketHandle handle ) : bool
handle WebSocketHandle
return bool
Ejemplo n.º 1
0
 public override void Abort()
 {
     if ((InternalState)_state == InternalState.Disposed)
     {
         return;
     }
     if (WebSocketHandle.IsValid(_innerWebSocket))
     {
         _innerWebSocket.Abort();
     }
     Dispose();
 }
Ejemplo n.º 2
0
        public override void Dispose()
        {
            var priorState = (InternalState)Interlocked.Exchange(ref _state, (int)InternalState.Disposed);

            if (priorState == InternalState.Disposed)
            {
                // No cleanup required.
                return;
            }
            if (WebSocketHandle.IsValid(_innerWebSocket))
            {
                _innerWebSocket.Dispose();
            }
        }