src/main/java/com/io7m/aeron_guide/take4/aeron_messaging/server/ClientsStateTracker.java
/**
     * This is kinda useless f-n, which iterates all connected clients and send
     * them a "private" message (not seen by other clients). Instead of this
     * waste of CPU cycles we'll reuse server's "all_clients_publication"
     * channel. It uses MDC (multi-destination-cast) to satisfy clients behind
     * NAT, and by it's nature it will broadcast 1 outgoing message to all the
     * connected clients for us!
     *
     * @param msg
     */
This is kinda useless f-n, which iterates all connected clients and send
them a "private" message (not seen by other clients). Instead of this
waste of CPU cycles we'll reuse server's "all_clients_publication"
channel. It uses MDC (multi-destination-cast) to satisfy clients behind
NAT, and by it's nature it will broadcast 1 outgoing message to all the
connected clients for us!

@param msg
This is kinda useless f - n which iterates all connected clients and send them a " private " message ( not seen by other clients ) . Instead of this waste of CPU cycles we ' ll reuse server ' s " all_clients_publication " channel . It uses MDC ( multi - destination - cast ) to satisfy clients behind NAT and by it ' s nature it will broadcast 1 outgoing message to all the connected clients for us! @param msg
public void sent_private_message_to_all_clients(String msg) {
        final Iterator<Map.Entry<Integer, AeronMessagingServerDuologue>> iter
                = this.client_duologues.entrySet().iterator();
        while (iter.hasNext()) {
            final Map.Entry<Integer, AeronMessagingServerDuologue> entry = iter.next();
            final AeronMessagingServerDuologue duologue = entry.getValue();
            try {
                duologue.send_private_message_to_client(msg);
            } catch (Exception ex) {
                System.err.println("Exception while trying to sent_private_message_to_all_clients: " + ex);
            }
        }
    }
public void sent_private_message_to_all_clients ( String msg ) { final Iterator < Map . Entry < Integer , AeronMessagingServerDuologue > > iter = this . client_duologues . entrySet ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { final Map . Entry < Integer , AeronMessagingServerDuologue > entry = iter . next ( ) ; final AeronMessagingServerDuologue duologue = entry . getValue ( ) ; try { duologue . send_private_message_to_client ( msg ) ; } catch ( Exception ex ) { System . err . println ( "Exception while trying to sent_private_message_to_all_clients: " + ex ) ; } } }
This is kinda useless f-n, which iterates all connected clients and send
 them a "private" message (not seen by other clients).
This is kinda useless f - n which iterates all connected clients and send them a " private " message ( not seen by other clients ) .
// this.client_duologues is a hashmap with key = session_id