31 #ifndef AUTOBAHN_WEBSOCKETPP_WEBSOCKET_TRANSPORT_HPP 32 #define AUTOBAHN_WEBSOCKETPP_WEBSOCKET_TRANSPORT_HPP 34 #include "boost_config.hpp" 38 #pragma warning(disable:4996) //Windows XP cancel async IO always fails with operation_not_supported 41 #define _WEBSOCKETPP_CPP11_FUNCTIONAL_ 42 #define _WEBSOCKETPP_CPP11_SYSTEM_ERROR_ 43 #define _WEBSOCKETPP_CPP11_RANDOM_DEVICE_ 44 #define _WEBSOCKETPP_CPP11_MEMORY_ 45 #define _WEBSOCKETPP_NOEXCEPT_ 49 #include "wamp_websocket_transport.hpp" 52 #include <websocketpp/config/asio_client.hpp> 53 #include <websocketpp/client.hpp> 60 template <
typename Config>
65 typedef websocketpp::client<Config> client_type;
66 typedef boost::lock_guard<boost::mutex> scoped_lock;
70 const std::string& uri,
71 bool debug_enabled =
false);
78 virtual bool is_open()
const override;
79 virtual void close()
override;
80 virtual void async_connect(
const std::string& uri, boost::promise<void>& connect_promise)
override;
81 virtual void write(
void const * payload,
size_t len)
override;
85 void on_ws_open(websocketpp::connection_hdl);
86 void on_ws_close(websocketpp::connection_hdl);
87 void on_ws_fail(websocketpp::connection_hdl);
88 void on_ws_message(websocketpp::connection_hdl,
typename client_type::message_ptr msg);
93 client_type &m_client;
95 websocketpp::connection_hdl m_hdl;
103 #include "wamp_websocketpp_websocket_transport.ipp" 104 #endif //AUTOBAHN_WEBSOCKETPP_WEBSOCKET_TRANSPORT_HPP virtual bool is_connected() const override
Determines if the transport is connected.
A transport that provides websocket support using WebSocket++ https://github.com/zaphoyd/websocketpp...
A class that represents a base websocket transport.