Net/Notifier/Server.php
protected function closeClient(
        Net_Notifier_WebSocket_Connection $client
    ) {
        $this->log(
            sprintf(
                'closing client %s ... ',
                $client->getIPAddress()
            ),
            Net_Notifier_Logger::VERBOSITY_CLIENT
        );

        if ($client->getState() < Net_Notifier_WebSocket_Connection::STATE_CLOSED) {
            $client->close();
        }

        $key = array_search($client, $this->clients);
        unset($this->clients[$key]);

        $key = array_search($client, $this->listenClients);
        if ($key !== false) {
            unset($this->listenClients[$key]);
        }

        $this->log(
            'done' . PHP_EOL,
            Net_Notifier_Logger::VERBOSITY_CLIENT,
            false
        );
    }
protected function closeClient(
        Net_Notifier_WebSocket_Connection $client
    ) {
        $this->log(
            sprintf(
                'closing client %s ... ',
                $client->getIPAddress()
            ),
            Net_Notifier_Logger::VERBOSITY_CLIENT
        );

        if ($client->getState() < Net_Notifier_WebSocket_Connection::STATE_CLOSED) {
            $client->close();
        }

        $key = array_search($client, $this->clients);
        unset($this->clients[$key]);

        $key = array_search($client, $this->listenClients);
        if ($key !== false) {
            unset($this->listenClients[$key]);
        }

        $this->log(
            'done' . PHP_EOL,
            Net_Notifier_Logger::VERBOSITY_CLIENT,
            false
        );
    }
protected function closeClient ( Net_Notifier_WebSocket_Connection $ client ) { $ this -> log ( sprintf ( 'closing client %s ... ' , $ client -> getIPAddress ( ) ) , Net_Notifier_Logger :: VERBOSITY_CLIENT ) ; if ( $ client -> getState ( ) < Net_Notifier_WebSocket_Connection :: STATE_CLOSED ) { $ client -> close ( ) ; } $ key = array_search ( $ client , $ this -> clients ) ; unset ( $ this -> clients [ $ key ] ) ; $ key = array_search ( $ client , $ this -> listenClients ) ; if ( $ key !== false ) { unset ( $ this -> listenClients [ $ key ] ) ; } $ this -> log ( 'done' . PHP_EOL , Net_Notifier_Logger :: VERBOSITY_CLIENT , false ) ; }
Closes a client socket and removes the client from the list of clients

@param Net_Notifier_WebSocket_Connection $client the client to close.

@return void
Closes a client socket and removes the client from the list of clients