28 #ifndef WEBSOCKETPP_PROCESSOR_BASE_HPP
29 #define WEBSOCKETPP_PROCESSOR_BASE_HPP
31 #include <websocketpp/common/cpp11.hpp>
32 #include <websocketpp/common/system_error.hpp>
35 #include <websocketpp/utilities.hpp>
36 #include <websocketpp/uri.hpp>
47 static char const upgrade_token[] =
"websocket";
48 static char const connection_token[] =
"upgrade";
49 static char const handshake_guid[] =
"258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
59 PROTOCOL_VIOLATION = 2,
162 char const * name()
const _WEBSOCKETPP_NOEXCEPT_TOKEN_ {
163 return "websocketpp.processor";
166 std::string message(
int value)
const {
169 return "Generic processor error";
171 return "invalid user input";
173 return "Generic protocol violation";
175 return "A message was too large";
177 return "A payload contained invalid data";
179 return "invalid function arguments";
181 return "invalid opcode";
183 return "Control messages are limited to fewer than 125 characters";
185 return "Invalid use of reserved bits";
187 return "Control messages cannot be fragmented";
189 return "Invalid message continuation";
191 return "Clients may not send unmasked frames";
193 return "Servers may not send masked frames";
195 return "Payload length was not minimally encoded";
197 return "64 bit frames are not supported on 32 bit systems";
199 return "Invalid UTF8 encoding";
201 return "Operation required not implemented functionality";
203 return "Invalid HTTP method.";
205 return "Invalid HTTP version.";
207 return "Invalid HTTP status.";
209 return "A required HTTP header is missing";
211 return "SHA-1 library error";
213 return "The WebSocket protocol version in use does not support this feature";
215 return "Reserved close code used";
217 return "Invalid close code used";
219 return "Using a close reason requires a valid close code";
221 return "Error parsing subprotocol header";
223 return "Error parsing extension header";
225 return "Extensions are disabled";
261 switch (ec.value()) {
287 _WEBSOCKETPP_ERROR_CODE_ENUM_NS_START_
288 template<>
struct is_error_code_enum<
websocketpp::processor::error::processor_errors>
290 static bool const value =
true;
292 _WEBSOCKETPP_ERROR_CODE_ENUM_NS_END_
294 #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.
lib::error_code make_error_code(error::processor_errors e)
Create an error code with the given value and the processor category.
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.