Store username in Session.
[dftpd.git] / SessionController.cpp
blob920e2a225ea0400fb26c5eea6cc5f01ee922f1a7
1 #include "SessionController.hpp"
3 SessionController::SessionController()
4 {}
6 SessionController::~SessionController()
10 void SessionController::Tick()
12 for( std::list<SessionPtr>::iterator it = m_list.begin(); it != m_list.end(); ++it )
14 (*it)->Tick();
17 while( !m_removeList.empty() )
19 unsigned int size = m_list.size();
20 m_list.remove( m_removeList.front() );
21 m_removeList.pop();
22 if( m_list.size() != size - 1 )
24 throw "[SessionController] Requested removal of non-existant session";
29 void SessionController::Add( const SessionPtr& session )
31 m_list.push_back( session );
34 void SessionController::Remove( const SessionPtr& session )
36 m_removeList.push( session );