Error code category and codes used by all processor types. More...
Classes | |
class | processor_category |
Category for processor errors. More... | |
Functions | |
lib::error_category const & | get_processor_category () |
Get a reference to a static copy of the processor error category. More... | |
lib::error_code | make_error_code (error::processor_errors e) |
Create an error code with the given value and the processor category. More... | |
close::status::value | to_ws (lib::error_code ec) |
Converts a processor error_code into a websocket close code. More... | |
Error code category and codes used by all processor types.
|
inline |
Get a reference to a static copy of the processor error category.
Definition at line 238 of file base.hpp.
Referenced by make_error_code(), and to_ws().
|
inline |
Create an error code with the given value and the processor category.
Definition at line 244 of file base.hpp.
References get_processor_category().
Referenced by BOOST_AUTO_TEST_CASE(), websocketpp::processor::hybi07< config >::client_handshake_request(), websocketpp::processor::hybi08< config >::client_handshake_request(), websocketpp::processor::hybi00< stub_config >::client_handshake_request(), websocketpp::processor::hybi00< stub_config >::extract_subprotocols(), websocketpp::processor::hybi13< stub_config >::extract_subprotocols(), websocketpp::connection< config >::handle_read_handshake(), websocketpp::processor::hybi00< stub_config >::validate_server_handshake_response(), and websocketpp::processor::hybi13< stub_config >::validate_server_handshake_response().
|
inline |
Converts a processor error_code into a websocket close code.
Looks up the appropriate WebSocket close code that should be sent after an error of this sort occurred.
If the error is not in the processor category close::status::blank is returned.
If the error isn't normally associated with reasons to close a connection (such as errors intended to be used internally or delivered to client applications, ex: invalid arguments) then close::status::internal_endpoint_error is returned.
Definition at line 261 of file base.hpp.
References _WEBSOCKETPP_ERROR_CODE_ENUM_NS_START_, websocketpp::close::status::blank, control_too_big, fragmented_control, get_processor_category(), websocketpp::close::status::internal_endpoint_error, invalid_close_code, invalid_continuation, invalid_opcode, invalid_payload, websocketpp::close::status::invalid_payload, invalid_rsv_bit, invalid_utf8, masking_forbidden, masking_required, message_too_big, websocketpp::close::status::message_too_big, websocketpp::close::status::protocol_error, protocol_violation, and reserved_close_code.
Referenced by websocketpp::connection< config >::handle_read_frame().