refectors session into client_session/server_session/core, adds client handler and chat_client example. Client functionality is experimental and non-compliant at the moment.

This commit is contained in:
Peter Thorson
2011-09-26 09:49:52 -05:00
parent 7d938df15e
commit da1795feac
29 changed files with 2100 additions and 452 deletions

View File

@@ -27,15 +27,15 @@
#include "echo.hpp"
using websocketecho::echo_handler;
using websocketecho::echo_server_handler;
void echo_handler::validate(websocketpp::session_ptr client) {}
void echo_server_handler::validate(websocketpp::session_ptr client) {}
void echo_handler::message(websocketpp::session_ptr client, const std::string &msg) {
void echo_server_handler::on_message(websocketpp::session_ptr client, const std::string &msg) {
client->send(msg);
}
void echo_handler::message(websocketpp::session_ptr client,
void echo_server_handler::on_message(websocketpp::session_ptr client,
const std::vector<unsigned char> &data) {
client->send(data);
}