Ejemplo n.º 1
0
 protected internal virtual void WriteData(byte[] buf, int offset, int len)
 {
     //IL_0019: Unknown result type (might be due to invalid IL or missing references)
     //IL_0024: Unknown result type (might be due to invalid IL or missing references)
     if (mClosed)
     {
         if (mFailedWithError)
         {
             throw new IOException(TLS_ERROR_MESSAGE);
         }
         throw new IOException("Sorry, connection has been closed, you cannot write more data");
     }
     while (len > 0)
     {
         if (mSplitApplicationDataRecords)
         {
             SafeWriteRecord(23, buf, offset, 1);
             offset++;
             len--;
         }
         if (len > 0)
         {
             int num = Math.Min(len, mRecordStream.GetPlaintextLimit());
             SafeWriteRecord(23, buf, offset, num);
             offset += num;
             len    -= num;
         }
     }
 }
Ejemplo n.º 2
0
 protected internal virtual void WriteData(byte[] buf, int offset, int len)
 {
     if (mClosed)
     {
         if (mFailedWithError)
         {
             throw new IOException(TLS_ERROR_MESSAGE);
         }
         throw new IOException("Sorry, connection has been closed, you cannot write more data");
     }
     while (len > 0)
     {
         if (mSplitApplicationDataRecords)
         {
             SafeWriteRecord(23, buf, offset, 1);
             offset++;
             len--;
         }
         if (len > 0)
         {
             int num = System.Math.Min(len, mRecordStream.GetPlaintextLimit());
             SafeWriteRecord(23, buf, offset, num);
             offset += num;
             len    -= num;
         }
     }
 }