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.

37 lines
1.4 KiB

4 months ago
  1. /*
  2. * IXWebSocketCloseConstants.h
  3. * Author: Benjamin Sergeant
  4. * Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
  5. */
  6. #pragma once
  7. #include <cstdint>
  8. #include <string>
  9. namespace ix
  10. {
  11. struct WebSocketCloseConstants
  12. {
  13. static const uint16_t kNormalClosureCode;
  14. static const uint16_t kInternalErrorCode;
  15. static const uint16_t kAbnormalCloseCode;
  16. static const uint16_t kProtocolErrorCode;
  17. static const uint16_t kNoStatusCodeErrorCode;
  18. static const uint16_t kInvalidFramePayloadData;
  19. static const std::string kNormalClosureMessage;
  20. static const std::string kInternalErrorMessage;
  21. static const std::string kAbnormalCloseMessage;
  22. static const std::string kPingTimeoutMessage;
  23. static const std::string kProtocolErrorMessage;
  24. static const std::string kNoStatusCodeErrorMessage;
  25. static const std::string kProtocolErrorReservedBitUsed;
  26. static const std::string kProtocolErrorPingPayloadOversized;
  27. static const std::string kProtocolErrorCodeControlMessageFragmented;
  28. static const std::string kProtocolErrorCodeDataOpcodeOutOfSequence;
  29. static const std::string kProtocolErrorCodeContinuationOpCodeOutOfSequence;
  30. static const std::string kInvalidFramePayloadDataMessage;
  31. static const std::string kInvalidCloseCodeMessage;
  32. };
  33. } // namespace ix