Add on_send_empty() to websockettpp.

This commit is contained in:
Arthur Britto
2013-01-05 15:33:31 -08:00
parent 53f900fbe1
commit b912eeb0af
2 changed files with 6 additions and 2 deletions

View File

@@ -1225,7 +1225,9 @@ public:
alog()->at(log::alevel::DEBUG_CLOSE)
<< "Exit after inturrupt" << log::endl;
terminate(false);
}
} else {
m_handler->on_send_empty(type::shared_from_this());
}
}
}
@@ -1267,7 +1269,7 @@ public:
if (m_write_queue.size() == 0) {
alog()->at(log::alevel::DEBUG_CLOSE)
<< "handle_write called with empty queue" << log::endl;
return;
return;
}
m_write_buffer -= m_write_queue.front()->get_payload().size();

View File

@@ -189,6 +189,8 @@ public:
virtual void on_pong(connection_ptr con,std::string) {}
virtual void on_pong_timeout(connection_ptr con,std::string) {}
virtual void http(connection_ptr con) {}
virtual void on_send_empty(connection_ptr con) {}
};
server(boost::asio::io_service& m)