28 #ifndef WEBSOCKETPP_PROCESSOR_BASE_HPP 29 #define WEBSOCKETPP_PROCESSOR_BASE_HPP 32 #include <websocketpp/utilities.hpp> 33 #include <websocketpp/uri.hpp> 35 #include <websocketpp/common/cpp11.hpp> 36 #include <websocketpp/common/system_error.hpp> 46 static char const upgrade_token[] =
"websocket";
47 static char const connection_token[] =
"Upgrade";
48 static char const handshake_guid[] =
"258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
58 PROTOCOL_VIOLATION = 2,
165 char const * name()
const _WEBSOCKETPP_NOEXCEPT_TOKEN_ {
166 return "websocketpp.processor";
169 std::string message(
int value)
const {
172 return "Generic processor error";
174 return "invalid user input";
176 return "Generic protocol violation";
178 return "A message was too large";
180 return "A payload contained invalid data";
182 return "invalid function arguments";
184 return "invalid opcode";
186 return "Control messages are limited to fewer than 125 characters";
188 return "Invalid use of reserved bits";
190 return "Control messages cannot be fragmented";
192 return "Invalid message continuation";
194 return "Clients may not send unmasked frames";
196 return "Servers may not send masked frames";
198 return "Payload length was not minimally encoded";
200 return "64 bit frames are not supported on 32 bit systems";
202 return "Invalid UTF8 encoding";
204 return "Operation required not implemented functionality";
206 return "Invalid HTTP method.";
208 return "Invalid HTTP version.";
210 return "Invalid HTTP status.";
212 return "A required HTTP header is missing";
214 return "SHA-1 library error";
216 return "The WebSocket protocol version in use does not support this feature";
218 return "Reserved close code used";
220 return "Invalid close code used";
222 return "Using a close reason requires a valid close code";
224 return "Error parsing subprotocol header";
226 return "Error parsing extension header";
228 return "Extensions are disabled";
230 return "Short Hybi00 Key 3 read";
266 switch (ec.value()) {
292 _WEBSOCKETPP_ERROR_CODE_ENUM_NS_START_
295 static bool const value =
true;
297 _WEBSOCKETPP_ERROR_CODE_ENUM_NS_END_
299 #endif //WEBSOCKETPP_PROCESSOR_BASE_HPP static value const internal_endpoint_error
uint16_t value
The type of a close code value.
static value const invalid_payload
An endpoint received message data inconsistent with its type.
Embedded SHA-1 library error.
Clients may not send unmasked frames.
WebSocket protocol processor abstract base class.
Using a reason requires a close code.
Illegal use of reserved bit.
No support for this feature in this protocol version.
static value const protocol_error
A protocol error occurred.
lib::error_category const & get_processor_category()
Get a reference to a static copy of the processor error category.
Processor encountered invalid payload data.
Operation required not implemented functionality.
Continuation without message.
Error was the result of improperly formatted user input.
Processor encountered a protocol violation in an incoming message.
Not supported on 32 bit systems.
Extension related operation was ignored because extensions are disabled.
close::status::value to_ws(lib::error_code ec)
Converts a processor error_code into a websocket close code.
Reserved close code used.
Namespace for the WebSocket++ project.
Error parsing subprotocols.
Servers may not send masked frames.
Fragmented control message.
Processor encountered a message that was too large.
static value const message_too_big
An endpoint received a message too large to process.
Error parsing extensions.
Category for processor errors.
Opcode was invalid for requested operation.
The processor method was called with invalid arguments.
Payload length not minimally encoded.
static value const blank
A blank value for internal use.