begins work on wscommand processing

This commit is contained in:
Peter Thorson
2011-12-17 08:35:37 -06:00
parent 5131f30d5a
commit 3405a91e56
4 changed files with 124 additions and 13 deletions

View File

@@ -166,8 +166,8 @@ public:
type::shared_from_this(),
msg));
}
void close(close::status::value code, const utf8_string& reason) {
// TODO:
void close(close::status::value code, const utf8_string& reason = "") {
// TODO: overloads without code or reason?
send_close(code, reason);
}
void ping(const binary_string& payload) {

View File

@@ -352,7 +352,7 @@ void server<endpoint>::connection<connection_type>::handle_read_request(
}
// TODO: is there a way to short circuit this or something?
//m_endpoint.alog().at(log::alevel::DEBUG_HANDSHAKE) << m_request.raw() << log::endl;
m_endpoint.alog().at(log::alevel::DEBUG_HANDSHAKE) << m_request.raw() << log::endl;
std::string h = m_request.header("Upgrade");
if (boost::ifind_first(h,"websocket")) {
@@ -539,7 +539,7 @@ void server<endpoint>::connection<connection_type>::log_open_result() {
<< ep << " "
<< (m_version == -1 ? "" : version.str())
<< (get_request_header("User-Agent") == "" ? "NULL" : get_request_header("User-Agent"))
<< " " << m_uri->get_resource() << " " << m_response.get_status_code()
<< " " << (m_uri ? m_uri->get_resource() : "uri is NULL") << " " << m_response.get_status_code()
<< log::endl;
}