Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
async_web_server_cpp::WebsocketConnection Class Reference

#include <websocket_connection.hpp>

List of all members.

Public Types

typedef boost::function< void(const
WebsocketMessage &message)> 
MessageHandler

Public Member Functions

bool sendFrame (WebsocketFrame &frame)
bool sendMessage (const WebsocketMessage &message)
bool sendPingMessage (const std::string &content="")
bool sendTextMessage (const std::string &content)
 WebsocketConnection (HttpConnectionPtr connection)

Private Member Functions

void handle_read (const char *begin, const char *end)
void set_message_handler (MessageHandler &handler)

Static Private Member Functions

static void static_handle_read (WebsocketConnectionWeakPtr weak_this, const char *begin, const char *end)

Private Attributes

HttpConnectionPtr connection_
WebsocketFrame frame_
WebsocketFrameBuffer frame_buffer_
WebsocketFrameParser frame_parser_
MessageHandler handler_
WebsocketMessage message_

Friends

class WebsocketHttpRequestHandler

Detailed Description

Represents a websocket connection. Similar to an HttpConnection, to keep the connection alive keep a shared pointer to this object.

Definition at line 25 of file websocket_connection.hpp.


Member Typedef Documentation

typedef boost::function<void(const WebsocketMessage& message)> async_web_server_cpp::WebsocketConnection::MessageHandler

Definition at line 31 of file websocket_connection.hpp.


Constructor & Destructor Documentation

Definition at line 9 of file websocket_connection.cpp.


Member Function Documentation

void async_web_server_cpp::WebsocketConnection::handle_read ( const char *  begin,
const char *  end 
) [private]

Definition at line 61 of file websocket_connection.cpp.

Definition at line 43 of file websocket_connection.cpp.

Definition at line 33 of file websocket_connection.cpp.

bool async_web_server_cpp::WebsocketConnection::sendPingMessage ( const std::string &  content = "")

Definition at line 24 of file websocket_connection.cpp.

bool async_web_server_cpp::WebsocketConnection::sendTextMessage ( const std::string &  content)

Definition at line 17 of file websocket_connection.cpp.

Definition at line 12 of file websocket_connection.cpp.

void async_web_server_cpp::WebsocketConnection::static_handle_read ( WebsocketConnectionWeakPtr  weak_this,
const char *  begin,
const char *  end 
) [static, private]

Definition at line 55 of file websocket_connection.cpp.


Friends And Related Function Documentation

friend class WebsocketHttpRequestHandler [friend]

Definition at line 52 of file websocket_connection.hpp.


Member Data Documentation

Definition at line 42 of file websocket_connection.hpp.

Definition at line 47 of file websocket_connection.hpp.

Definition at line 50 of file websocket_connection.hpp.

Definition at line 49 of file websocket_connection.hpp.

Definition at line 45 of file websocket_connection.hpp.

Definition at line 48 of file websocket_connection.hpp.


The documentation for this class was generated from the following files:


async_web_server_cpp
Author(s): Mitchell Wills
autogenerated on Thu Aug 27 2015 12:27:39