mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
updates examples for new on_close api
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user