Net/Notifier/Server.php
protected function relayNotification($message)
    {
        $message = json_encode($message);

        foreach ($this->listenClients as $client) {
            if ($client->getState() < Net_Notifier_WebSocket_Connection::STATE_CLOSING) {

                $this->log(
                    sprintf(
                        ' ... relaying message "%s" to %s ... ',
                        $message,
                        $client->getIPAddress()
                    ),
                    Net_Notifier_Logger::VERBOSITY_CLIENT
                );

                $client->writeText($message);

                $this->log(
                    'done' . PHP_EOL,
                    Net_Notifier_Logger::VERBOSITY_CLIENT,
                    false
                );
            }
        }
    }
protected function relayNotification($message)
    {
        $message = json_encode($message);

        foreach ($this->listenClients as $client) {
            if ($client->getState() < Net_Notifier_WebSocket_Connection::STATE_CLOSING) {

                $this->log(
                    sprintf(
                        ' ... relaying message "%s" to %s ... ',
                        $message,
                        $client->getIPAddress()
                    ),
                    Net_Notifier_Logger::VERBOSITY_CLIENT
                );

                $client->writeText($message);

                $this->log(
                    'done' . PHP_EOL,
                    Net_Notifier_Logger::VERBOSITY_CLIENT,
                    false
                );
            }
        }
    }
protected function relayNotification ( $ message ) { $ message = json_encode ( $ message ) ; foreach ( $ this -> listenClients as $ client ) { if ( $ client -> getState ( ) < Net_Notifier_WebSocket_Connection :: STATE_CLOSING ) { $ this -> log ( sprintf ( ' ... relaying message "%s" to %s ... ' , $ message , $ client -> getIPAddress ( ) ) , Net_Notifier_Logger :: VERBOSITY_CLIENT ) ; $ client -> writeText ( $ message ) ; $ this -> log ( 'done' . PHP_EOL , Net_Notifier_Logger :: VERBOSITY_CLIENT , false ) ; } } }
Notifies all connected clients of an event

@param string $message the message being relayed.

@return void
Notifies all connected clients of an event