You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.0 KiB

  1. #if !NET20
  2. using System;
  3. namespace Apewer.WebSocket
  4. {
  5. internal static class StatusCodes
  6. {
  7. public const ushort NormalClosure = 1000;
  8. public const ushort GoingAway = 1001;
  9. public const ushort ProtocolError = 1002;
  10. public const ushort UnsupportedDataType = 1003;
  11. public const ushort NoStatusReceived = 1005;
  12. public const ushort AbnormalClosure = 1006;
  13. public const ushort InvalidFramePayloadData = 1007;
  14. public const ushort PolicyViolation = 1008;
  15. public const ushort MessageTooBig = 1009;
  16. public const ushort MandatoryExt = 1010;
  17. public const ushort InternalServerError = 1011;
  18. public const ushort TLSHandshake = 1015;
  19. public const ushort ApplicationError = 3000;
  20. public static ushort[] ValidCloseCodes = new[]{
  21. NormalClosure, GoingAway, ProtocolError, UnsupportedDataType,
  22. InvalidFramePayloadData, PolicyViolation, MessageTooBig,
  23. MandatoryExt, InternalServerError
  24. };
  25. }
  26. }
  27. #endif