Add constants for closing code and messages
This commit is contained in:
29
ixwebsocket/IXWebSocketCloseConstants.h
Normal file
29
ixwebsocket/IXWebSocketCloseConstants.h
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* IXWebSocketCloseConstants.h
|
||||
* Author: Benjamin Sergeant
|
||||
* Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace ix
|
||||
{
|
||||
struct WebSocketCloseConstants
|
||||
{
|
||||
static const uint16_t kNormalClosureCode;
|
||||
static const uint16_t kInternalErrorCode;
|
||||
static const uint16_t kAbnormalCloseCode;
|
||||
static const uint16_t kProtocolErrorCode;
|
||||
static const uint16_t kNoStatusCodeErrorCode;
|
||||
|
||||
static const std::string kNormalClosureMessage;
|
||||
static const std::string kInternalErrorMessage;
|
||||
static const std::string kAbnormalCloseMessage;
|
||||
static const std::string kPingTimeoutMessage;
|
||||
static const std::string kProtocolErrorMessage;
|
||||
static const std::string kNoStatusCodeErrorMessage;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user