Class WebsocketConnection
Defined in File websocket_connection.hpp
Inheritance Relationships
Base Types
public boost::enable_shared_from_this< WebsocketConnection >
private boost::noncopyable
Class Documentation
-
class async_web_server_cpp::WebsocketConnection : public boost::enable_shared_from_this<WebsocketConnection>, private boost::noncopyable
Represents a websocket connection. Similar to an HttpConnection, to keep the connection alive keep a shared pointer to this object.
Public Types
-
typedef boost::function<void(const WebsocketMessage &message)> MessageHandler
Public Functions
-
explicit WebsocketConnection(HttpConnectionPtr connection)
-
bool sendTextMessage(const std::string &content)
-
bool sendPingMessage(const std::string &content = "")
-
bool sendMessage(const WebsocketMessage &message)
-
bool sendFrame(WebsocketFrame &frame)
-
typedef boost::function<void(const WebsocketMessage &message)> MessageHandler