28 #ifndef WEBSOCKETPP_CLIENT_ENDPOINT_HPP
29 #define WEBSOCKETPP_CLIENT_ENDPOINT_HPP
31 #include <websocketpp/endpoint.hpp>
32 #include <websocketpp/logger/levels.hpp>
43 template <
typename config>
67 explicit client() : endpoint_type(false)
85 if (location->get_secure() && !transport_type::is_secure()) {
90 connection_ptr con = endpoint_type::create_connection();
97 con->set_uri(location);
99 ec = lib::error_code();
117 if (!location->get_valid()) {
136 transport_type::async_connect(
137 lib::static_pointer_cast<transport_con_type>(con),
140 &type::handle_connect,
143 lib::placeholders::_1
151 void handle_connect(connection_ptr con, lib::error_code
const & ec) {
156 "handle_connect error: "+ec.message());
159 "Successful connection");
168 #endif //WEBSOCKETPP_CLIENT_ENDPOINT_HPP
connection_type::ptr connection_ptr
Type of a shared pointer to the connections this server will create.
connection_ptr get_connection(std::string const &u, lib::error_code &ec)
Get a new connection (string version)
endpoint< connection_type, config > endpoint_type
Type of the endpoint component of this server.
Represents an individual WebSocket connection.
Client endpoint role based on the given config.
connection_ptr connect(connection_ptr con)
Begin the connection process for the given connection.
transport_con_type::ptr transport_con_ptr
Type of a shared pointer to the connection transport component.
static level const devel
Development messages (warning: very chatty)
transport_type::transport_con_type transport_con_type
Type of the connection transport component.
client< config > type
Type of this endpoint.
Namespace for the WebSocket++ project.
config::concurrency_type concurrency_type
Type of the endpoint concurrency component.
Creates and manages connections associated with a WebSocket endpoint.
lib::shared_ptr< uri > uri_ptr
Pointer to a URI.
lib::shared_ptr< type > ptr
Type of a shared pointer to this connection.
Attempted to open a secure connection with an insecure endpoint.
connection< config > connection_type
Type of the connections this server will create.
config::transport_type transport_type
Type of the endpoint transport component.
connection_ptr get_connection(uri_ptr location, lib::error_code &ec)
Get a new connection.
static level const rerror
An invalid uri was supplied.
static level const connect
Information about new connections.
Connection creation attempted failed.