#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);
   }   
   
}

