1/*
2 * IXWebSocketCloseConstants.cpp
3 * Author: Benjamin Sergeant
4 * Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
5 */
6
7#include "IXWebSocketCloseConstants.h"
8
9namespace ix
10{
11 const uint16_t WebSocketCloseConstants::kNormalClosureCode(1000);
12 const uint16_t WebSocketCloseConstants::kInternalErrorCode(1011);
13 const uint16_t WebSocketCloseConstants::kAbnormalCloseCode(1006);
14 const uint16_t WebSocketCloseConstants::kInvalidFramePayloadData(1007);
15 const uint16_t WebSocketCloseConstants::kProtocolErrorCode(1002);
16 const uint16_t WebSocketCloseConstants::kNoStatusCodeErrorCode(1005);
17
18 const std::string WebSocketCloseConstants::kNormalClosureMessage("Normal closure");
19 const std::string WebSocketCloseConstants::kInternalErrorMessage("Internal error");
20 const std::string WebSocketCloseConstants::kAbnormalCloseMessage("Abnormal closure");
21 const std::string WebSocketCloseConstants::kPingTimeoutMessage("Ping timeout");
22 const std::string WebSocketCloseConstants::kProtocolErrorMessage("Protocol error");
23 const std::string WebSocketCloseConstants::kNoStatusCodeErrorMessage("No status code");
24 const std::string WebSocketCloseConstants::kProtocolErrorReservedBitUsed("Reserved bit used");
25 const std::string WebSocketCloseConstants::kProtocolErrorPingPayloadOversized(
26 "Ping reason control frame with payload length > 125 octets");
27 const std::string WebSocketCloseConstants::kProtocolErrorCodeControlMessageFragmented(
28 "Control message fragmented");
29 const std::string WebSocketCloseConstants::kProtocolErrorCodeDataOpcodeOutOfSequence(
30 "Fragmentation: data message out of sequence");
31 const std::string WebSocketCloseConstants::kProtocolErrorCodeContinuationOpCodeOutOfSequence(
32 "Fragmentation: continuation opcode out of sequence");
33 const std::string WebSocketCloseConstants::kInvalidFramePayloadDataMessage(
34 "Invalid frame payload data");
35 const std::string WebSocketCloseConstants::kInvalidCloseCodeMessage("Invalid close code");
36} // namespace ix
37