re-adds utf8 validation, passes all autobahn tests except edge close cases (reading invalid wire codes) starts working on chat server example update

This commit is contained in:
Peter Thorson
2011-11-11 16:21:38 -06:00
parent 0767a6ef18
commit 74aa325591
8 changed files with 165 additions and 53 deletions

View File

@@ -30,13 +30,13 @@
#include <boost/algorithm/string/replace.hpp>
using websocketchat::chat_server_handler;
using websocketpp::session_ptr;
using websocketpp::session::server_session_ptr;
void chat_server_handler::validate(session_ptr client) {
void chat_server_handler::validate(server_session_ptr session) {
std::stringstream err;
// We only know about the chat resource
if (client->get_resource() != "/chat") {
if (session->get_uri().resource != "/chat") {
err << "Request for unknown resource " << client->get_resource();
throw(websocketpp::handshake_error(err.str(),404));
}