Logo Search packages:      
Sourcecode: znc version File versions  Download package

template<class T>
virtual void TSocketManager< T >::DelSock ( u_int  iPos  )  [inline, virtual]

Delete a sock by position in the vector the socket is deleted, the appropriate call backs are peformed and its instance is removed from the manager deleting in a loop can be tricky, be sure you watch your position. ie for( u_int a = 0; a < size(); a++ ) DelSock( a-- );

Definition at line 1628 of file Csocket.h.

            if ( iPos >= this->size() )
                  CS_DEBUG( "Invalid Sock Position Requested! [" << iPos << "]" );
            if ( (*this)[iPos]->IsConnected() )
                  (*this)[iPos]->Disconnected(); // only call disconnected event if connected event was called (IE IsConnected was set)

            CS_Delete( (*this)[iPos] );
            this->erase( this->begin() + iPos );

Generated by  Doxygen 1.6.0   Back to index