adjust chat server/client for new connection_handler ifc

This commit is contained in:
Tobias Oberstein
2011-10-26 17:05:37 +02:00
parent 2c47fe17a4
commit cc08864401
4 changed files with 4 additions and 4 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

@@ -59,7 +59,7 @@ void chat_server_handler::on_open(session_ptr client) {
send_to_all(encode_message("server",m_connections[client]+" has joined the chat."));
}
void chat_server_handler::on_close(session_ptr client,uint16_t status,const std::string &reason) {
void chat_server_handler::on_close(session_ptr client) {
std::map<session_ptr,std::string>::iterator it = m_connections.find(client);
if (it == m_connections.end()) {

View File

@@ -59,7 +59,7 @@ public:
void on_open(websocketpp::session_ptr client);
// someone disconnected from the lobby, remove them
void on_close(websocketpp::session_ptr client,uint16_t status,const std::string &reason);
void on_close(websocketpp::session_ptr client);
void on_message(websocketpp::session_ptr client,const std::string &msg);