TlsEncodeResult.cs 975 B

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