function destroy() {
        if(!$this->sockets) {
            if($this->timer) {
                $this->loop->cancelTimer($this->timer);
                $this->timer = null;
            }
            
            return;
        }
        
        if($this->streams->count() > 0) {
            foreach($this->streams as $stream) {
                $stream->close();
            }
        }
    }
function destroy() {
        if(!$this->sockets) {
            if($this->timer) {
                $this->loop->cancelTimer($this->timer);
                $this->timer = null;
            }
            
            return;
        }
        
        if($this->streams->count() > 0) {
            foreach($this->streams as $stream) {
                $stream->close();
            }
        }
    }
function destroy ( ) { if ( ! $ this -> sockets ) { if ( $ this -> timer ) { $ this -> loop -> cancelTimer ( $ this -> timer ) ; $ this -> timer = null ; } return ; } if ( $ this -> streams -> count ( ) > 0 ) { foreach ( $ this -> streams as $ stream ) { $ stream -> close ( ) ; } } }
Destroys the messenger. And everything.
@return void
Destroys the messenger . And everything .