示例#1
0
 private void ProcessAlert()
 {
     while (true)
     {
         if (mAlertQueue.Available < 2)
         {
             return;
         }
         byte[] array = mAlertQueue.RemoveData(2, 0);
         byte   b     = array[0];
         byte   b2    = array[1];
         Peer.NotifyAlertReceived(b, b2);
         if (b == 2)
         {
             break;
         }
         if (b2 == 0)
         {
             HandleClose(user_canceled: false);
         }
         HandleWarningMessage(b2);
     }
     InvalidateSession();
     mFailedWithError = true;
     mClosed          = true;
     mRecordStream.SafeClose();
     throw new IOException(TLS_ERROR_MESSAGE);
 }
示例#2
0
 private void ProcessAlert()
 {
     //IL_0051: Unknown result type (might be due to invalid IL or missing references)
     while (mAlertQueue.Available >= 2)
     {
         byte[] array = mAlertQueue.RemoveData(2, 0);
         byte   b     = array[0];
         byte   b2    = array[1];
         Peer.NotifyAlertReceived(b, b2);
         if (b == 2)
         {
             InvalidateSession();
             mFailedWithError = true;
             mClosed          = true;
             mRecordStream.SafeClose();
             throw new IOException(TLS_ERROR_MESSAGE);
         }
         if (b2 == 0)
         {
             HandleClose(user_canceled: false);
         }
         HandleWarningMessage(b2);
     }
 }