HeartbeatMode.cs 506 B

12345678910111213141516171819202122
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. using System;
  3. namespace Org.BouncyCastle.Crypto.Tls
  4. {
  5. /*
  6. * RFC 6520
  7. */
  8. public abstract class HeartbeatMode
  9. {
  10. public const byte peer_allowed_to_send = 1;
  11. public const byte peer_not_allowed_to_send = 2;
  12. public static bool IsValid(byte heartbeatMode)
  13. {
  14. return heartbeatMode >= peer_allowed_to_send && heartbeatMode <= peer_not_allowed_to_send;
  15. }
  16. }
  17. }
  18. #endif