void SocketConnection::readMessages( SocketMonitor& s ) { if( !m_pSession ) return; std::string msg; while( readMessage( msg ) ) { try { m_pSession->next( msg, UtcTimeStamp() ); } catch ( InvalidMessage& ) { if( !m_pSession->isLoggedOn() ) s.drop( m_socket ); } } }
void onError( SocketMonitor& monitor, int socket ) { m_strategy.onDisconnect( m_server, socket ); monitor.drop( socket ); }