/* * verifyClients() */ static void verifyClients ( tsFreeList < repeaterClient, 0x20 > & freeList ) { static tsDLList < repeaterClient > theClients; repeaterClient *pclient; while ( ( pclient = client_list.get () ) ) { if ( pclient->verify () ) { theClients.add ( *pclient ); } else { pclient->~repeaterClient (); freeList.release ( pclient ); } } client_list.add ( theClients ); }
/* * fanOut() */ static void fanOut ( const osiSockAddr & from, const void * pMsg, unsigned msgSize, tsFreeList < repeaterClient, 0x20 > & freeList ) { static tsDLList < repeaterClient > theClients; repeaterClient *pclient; while ( ( pclient = client_list.get () ) ) { theClients.add ( *pclient ); /* Dont reflect back to sender */ if ( pclient->identicalAddress ( from ) ) { continue; } if ( ! pclient->sendMessage ( pMsg, msgSize ) ) { if ( ! pclient->verify () ) { theClients.remove ( *pclient ); pclient->~repeaterClient (); freeList.release ( pclient ); } } } client_list.add ( theClients ); }