28#ifndef WEBSOCKETPP_PROCESSOR_BASE_HPP
29#define WEBSOCKETPP_PROCESSOR_BASE_HPP
46static char const upgrade_token[] =
"websocket";
47static char const connection_token[] =
"upgrade";
48static char const handshake_guid[] =
"258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
166 return "websocketpp.processor";
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";
263 return close::status::blank;
266 switch (ec.value()) {
277 return close::status::protocol_error;
280 return close::status::invalid_payload;
282 return close::status::message_too_big;
284 return close::status::internal_endpoint_error;
293template<>
struct is_error_code_enum<
websocketpp::processor::error::processor_errors>
Category for processor errors.
char const * name() const _WEBSOCKETPP_NOEXCEPT_TOKEN_
std::string message(int value) const
WebSocket protocol processor abstract base class.
#define _WEBSOCKETPP_NOEXCEPT_TOKEN_
const uint8_t constants[]
uint16_t value
The type of a close code value.
lib::error_category const & get_processor_category()
Get a reference to a static copy of the processor error category.
close::status::value to_ws(lib::error_code ec)
Converts a processor error_code into a websocket close code.
@ missing_required_header
Missing Required Header.
@ control_too_big
Control frame too large.
@ invalid_http_method
Invalid HTTP method.
@ invalid_rsv_bit
Illegal use of reserved bit.
@ reason_requires_code
Using a reason requires a close code.
@ invalid_close_code
Invalid close code used.
@ masking_required
Clients may not send unmasked frames.
@ protocol_violation
Processor encountered a protocol violation in an incoming message.
@ extensions_disabled
Extension related operation was ignored because extensions are disabled.
@ reserved_close_code
Reserved close code used.
@ extension_parse_error
Error parsing extensions.
@ masking_forbidden
Servers may not send masked frames.
@ not_implemented
Operation required not implemented functionality.
@ invalid_opcode
Opcode was invalid for requested operation.
@ sha1_library
Embedded SHA-1 library error.
@ requires_64bit
Not supported on 32 bit systems.
@ subprotocol_parse_error
Error parsing subprotocols.
@ bad_request
Error was the result of improperly formatted user input.
@ invalid_utf8
Invalid UTF-8 encoding.
@ invalid_http_status
Invalid HTTP status.
@ invalid_payload
Processor encountered invalid payload data.
@ invalid_http_version
Invalid HTTP version.
@ message_too_big
Processor encountered a message that was too large.
@ no_protocol_support
No support for this feature in this protocol version.
@ invalid_arguments
The processor method was called with invalid arguments.
@ invalid_continuation
Continuation without message.
@ non_minimal_encoding
Payload length not minimally encoded.
@ fragmented_control
Fragmented control message.
lib::error_code make_error_code(error::processor_errors e)
Create an error code with the given value and the processor category.
Namespace for the WebSocket++ project.
#define _WEBSOCKETPP_ERROR_CODE_ENUM_NS_END_
#define _WEBSOCKETPP_ERROR_CODE_ENUM_NS_START_