ServerCore/Service.cpp
2019-03-04 13:08:34 -08:00

26 lines
575 B
C++

#include "Service.h"
#include "TCPServerSocket.h"
#include "Exception.h"
namespace core {
Service::Service() {}
void Service::init(TCPServerSocket *server) {
this->server = server;
}
void Service::removeFromSessionList(Session *session) {
std::vector<Session *>::iterator cursor;
for(cursor = sessions.begin(); cursor < sessions.end(); ++cursor)
if(*cursor == session)
sessions.erase(cursor);
}
void Service::sessionErrorHandler(std::string errorString, Session *session) {
throw Exception(errorString);
}
}