public function disconnect(Socket $client, $message = '')
    {
        $clientIndex = array_search($client, $this->clients);
        $return = $this->triggerHooks(
            self::HOOK_DISCONNECT,
            $this->clients[$clientIndex],
            $message
        );

        $this->clients[$clientIndex]->close();
        unset($this->clients[$clientIndex]);
        unset($client);

        if ($return === false) {
            return false;
        }

        unset($return);

        return true;
    }
public function disconnect(Socket $client, $message = '')
    {
        $clientIndex = array_search($client, $this->clients);
        $return = $this->triggerHooks(
            self::HOOK_DISCONNECT,
            $this->clients[$clientIndex],
            $message
        );

        $this->clients[$clientIndex]->close();
        unset($this->clients[$clientIndex]);
        unset($client);

        if ($return === false) {
            return false;
        }

        unset($return);

        return true;
    }
public function disconnect ( Socket $ client , $ message = '' ) { $ clientIndex = array_search ( $ client , $ this -> clients ) ; $ return = $ this -> triggerHooks ( self :: HOOK_DISCONNECT , $ this -> clients [ $ clientIndex ] , $ message ) ; $ this -> clients [ $ clientIndex ] -> close ( ) ; unset ( $ this -> clients [ $ clientIndex ] ) ; unset ( $ client ) ; if ( $ return === false ) { return false ; } unset ( $ return ) ; return true ; }
Disconnect the supplied Client Socket.

@param Socket $client
@param string $message Disconnection Message.  Could be used to trigger a disconnect with a status code

@return bool Whether or not to continue running the server (true: continue, false: shutdown)
Disconnect the supplied Client Socket .