#include "Service.h" #include "TCPServerSocket.h" #include "Exception.h" namespace core { Service::Service() {} void Service::removeFromSessionList(Session *session) { std::vector::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 coreutils::Exception(errorString); } Session * Service::getSocketAccept(EPoll &ePoll) { return new Session(ePoll, *this); } void Service::output(Session *session) { session->out << "|" << session->ipAddress.getClientAddressAndPort(); } }