Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ProcessBlob()

ProtocolToken System.Net.Security.SslStream.ProcessBlob ( int frameSize)
inlineprivate

Definition at line 1294 of file SslStream.cs.

1295 {
1296 int num = frameSize;
1297 ReadOnlySpan<byte> activeReadOnlySpan = _handshakeBuffer.ActiveReadOnlySpan;
1298 _handshakeBuffer.Discard(frameSize);
1299 if (_framing == Framing.SinceSSL3)
1300 {
1301 while (_handshakeBuffer.ActiveLength > 5)
1302 {
1303 TlsFrameHeader header = default(TlsFrameHeader);
1304 if (!TlsFrameHelper.TryGetFrameHeader(_handshakeBuffer.ActiveReadOnlySpan, ref header))
1305 {
1306 break;
1307 }
1308 frameSize = header.Length + 5;
1309 if ((header.Type != TlsContentType.Handshake && header.Type != TlsContentType.ChangeCipherSpec) || frameSize > _handshakeBuffer.ActiveLength)
1310 {
1311 break;
1312 }
1313 num += frameSize;
1314 _handshakeBuffer.Discard(frameSize);
1315 }
1316 }
1317 return _context.NextMessage(activeReadOnlySpan.Slice(0, num));
1318 }
ProtocolToken NextMessage(ReadOnlySpan< byte > incomingBuffer)
ReadOnlySpan< byte > ActiveReadOnlySpan
void Discard(int byteCount)

References System.Net.Security.SslStream._context, System.Net.Security.SslStream._framing, System.Net.Security.SslStream._handshakeBuffer, System.Net.ArrayBuffer.ActiveLength, System.Net.ArrayBuffer.ActiveReadOnlySpan, System.Net.ArrayBuffer.Discard(), System.Net.Security.SecureChannel.NextMessage(), System.ReadOnlySpan< T >.Slice(), System.Net.Security.TlsFrameHelper.TryGetFrameHeader(), and System.Net.Security.TlsFrameHeader.Type.

Referenced by System.Net.Security.SslStream.ReceiveBlobAsync< TIOAdapter >().