TlsDecodeResult.cs 979 B

1234567891011121314151617181920212223242526272829303132333435
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto
  5. {
  6. public sealed class TlsDecodeResult
  7. {
  8. public readonly byte[] buf;
  9. public readonly int off, len;
  10. public readonly short contentType;
  11. public readonly bool fromBufferPool;
  12. public TlsDecodeResult(byte[] buf, int off, int len, short contentType)
  13. {
  14. this.buf = buf;
  15. this.off = off;
  16. this.len = len;
  17. this.contentType = contentType;
  18. this.fromBufferPool = false;
  19. }
  20. public TlsDecodeResult(byte[] buf, int off, int len, short contentType, bool fromPool)
  21. {
  22. this.buf = buf;
  23. this.off = off;
  24. this.len = len;
  25. this.contentType = contentType;
  26. this.fromBufferPool = fromPool;
  27. }
  28. }
  29. }
  30. #pragma warning restore
  31. #endif