ServerCore/Service.cpp
2019-02-16 13:08:24 -08:00

22 lines
539 B
C++

#include "Service.h"
#include "TCPServerSocket.h"
#include "Exception.h"
namespace core {
Service::Service(TCPServerSocket &server) : 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);
}
}