WebSocket++
0.8.1
C++ websocket client/server library
|
28 #ifndef WEBSOCKETPP_PROCESSOR_HYBI08_HPP
29 #define WEBSOCKETPP_PROCESSOR_HYBI08_HPP
31 #include <websocketpp/processors/hybi13.hpp>
43 template <
typename config>
46 typedef hybi08<config> type;
47 typedef typename config::request_type request_type;
49 typedef typename config::con_msg_manager_type::ptr msg_manager_ptr;
50 typedef typename config::rng_type rng_type;
52 explicit hybi08(
bool secure,
bool p_is_server, msg_manager_ptr manager, rng_type& rng)
53 :
hybi13<config>(secure, p_is_server, manager, rng) {}
74 std::string
const &
get_origin(request_type
const & r)
const {
75 return r.get_header(
"Sec-WebSocket-Origin");
lib::shared_ptr< uri > uri_ptr
Pointer to a URI.
Error code category and codes used by all processor types.
@ no_protocol_support
No support for this feature in this protocol version.
static std::vector< int > const versions_supported(helper, helper+4)
Container that stores the list of protocol versions supported.
std::string const & get_origin(request_type const &r) const
Return the value of the header containing the CORS origin.
lib::error_code make_error_code(error::processor_errors e)
Create an error code with the given value and the processor category.
Processor for Hybi Draft version 08.
Processors encapsulate the protocol rules specific to each WebSocket version.
Processor for Hybi version 13 (RFC6455)
lib::error_code client_handshake_request(request_type &, uri_ptr, std::vector< std::string > const &) const
Fill in a set of request headers for a client connection request.
int get_version() const
Get the protocol version of this processor.