WebSocket++
0.8.1
C++ websocket client/server library
|
28 #ifndef WEBSOCKETPP_CLIENT_ENDPOINT_HPP
29 #define WEBSOCKETPP_CLIENT_ENDPOINT_HPP
31 #include <websocketpp/endpoint.hpp>
32 #include <websocketpp/uri.hpp>
34 #include <websocketpp/logger/levels.hpp>
36 #include <websocketpp/common/system_error.hpp>
46 template <
typename config>
90 if (location->get_secure() && !transport_type::is_secure()) {
102 con->set_uri(location);
104 ec = lib::error_code();
120 uri_ptr location = lib::make_shared<uri>(u);
122 if (!location->get_valid()) {
127 return get_connection(location, ec);
145 &
type::handle_connect,
148 lib::placeholders::_1
156 void handle_connect(
connection_ptr con, lib::error_code
const & ec) {
161 "handle_connect error: "+ec.message());
164 "Successful connection");
static level const rerror
lib::shared_ptr< uri > uri_ptr
Pointer to a URI.
Client endpoint role based on the given config.
transport_type::transport_con_type transport_con_type
Type of the connection transport component.
Library level error codes.
@ endpoint_not_secure
Attempted to open a secure connection with an insecure endpoint.
client< config > type
Type of this endpoint.
config::concurrency_type concurrency_type
Type of the endpoint concurrency component.
Represents an individual WebSocket connection.
@ con_creation_failed
Connection creation attempted failed.
@ invalid_uri
An invalid uri was supplied.
connection< config > connection_type
Type of the connections this server will create.
config::transport_type transport_type
Type of the endpoint transport component.
static level const connect
Information about new connections.
static std::vector< int > const versions_supported(helper, helper+4)
Container that stores the list of protocol versions supported.
transport_con_type::ptr transport_con_ptr
Type of a shared pointer to the connection transport component.
connection_type::ptr connection_ptr
Type of a shared pointer to the connections this server will create.
Package of log levels for logging errors.
connection_ptr get_connection(std::string const &u, lib::error_code &ec)
Get a new connection (string version)
connection_ptr connect(connection_ptr con)
Begin the connection process for the given connection.
endpoint< connection_type, config > endpoint_type
Type of the endpoint component of this server.
connection_ptr get_connection(uri_ptr location, lib::error_code &ec)
Get a new connection.
Package of log levels for logging access events.
Creates and manages connections associated with a WebSocket endpoint.
static level const devel
Development messages (warning: very chatty)