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