updates examples for new on_close api

This commit is contained in:
Peter Thorson
2011-10-26 11:07:02 -05:00
parent 1d7cb1bee3
commit 46df7bac65
4 changed files with 4 additions and 7 deletions

View File

@@ -39,7 +39,7 @@ void chat_client_handler::on_open(session_ptr s) {
std::cout << "Successfully connected" << std::endl;
}
void chat_client_handler::on_close(session_ptr s,uint16_t status,const std::string &reason) {
void chat_client_handler::on_close(session_ptr s) {
// not sure if anything needs to happen here either.
m_session = client_session_ptr();

View File

@@ -63,7 +63,7 @@ public:
void on_open(session_ptr s);
// connection to chat room closed
void on_close(session_ptr s,uint16_t status,const std::string &reason);
void on_close(session_ptr s);
// got a new message from server
void on_message(session_ptr s,const std::string &msg);

View File

@@ -36,7 +36,7 @@ void echo_client_handler::on_open(session_ptr s) {
std::cout << "Successfully connected: " << s->get_resource() << std::endl;
}
void echo_client_handler::on_close(session_ptr s,uint16_t status,const std::string &reason) {
void echo_client_handler::on_close(session_ptr s) {
std::cout << "client was disconnected" << std::endl;
}

View File

@@ -56,14 +56,11 @@ public:
echo_client_handler() : m_case_count(0) {}
virtual ~echo_client_handler() {}
// ignored for clients?
void validate(session_ptr s) {}
// connection to chat room complete
void on_open(session_ptr s);
// connection to chat room closed
void on_close(session_ptr s,uint16_t status,const std::string &reason);
void on_close(session_ptr sn);
// got a new message from server
void on_message(session_ptr s,const std::string &msg);