src/whatsprot.class.php
public function disconnect()
     {
         if (is_resource($this->socket)) {
             @socket_shutdown($this->socket, 2);
             @socket_close($this->socket);
         }
         $this->socket = null;
         $this->loginStatus = Constants::DISCONNECTED_STATUS;
         $this->logFile('info', 'Disconnected from WA server');
         $this->eventManager()->fire('onDisconnect',
             [
                 $this->phoneNumber,
                 $this->socket,
             ]
         );
     }
public function disconnect()
     {
         if (is_resource($this->socket)) {
             @socket_shutdown($this->socket, 2);
             @socket_close($this->socket);
         }
         $this->socket = null;
         $this->loginStatus = Constants::DISCONNECTED_STATUS;
         $this->logFile('info', 'Disconnected from WA server');
         $this->eventManager()->fire('onDisconnect',
             [
                 $this->phoneNumber,
                 $this->socket,
             ]
         );
     }
public function disconnect ( ) { if ( is_resource ( $ this -> socket ) ) { @ socket_shutdown ( $ this -> socket , 2 ) ; @ socket_close ( $ this -> socket ) ; } $ this -> socket = null ; $ this -> loginStatus = Constants :: DISCONNECTED_STATUS ; $ this -> logFile ( 'info' , 'Disconnected from WA server' ) ; $ this -> eventManager ( ) -> fire ( 'onDisconnect' , [ $ this -> phoneNumber , $ this -> socket , ] ) ; }
Disconnect from the WhatsApp network.
Disconnect from the WhatsApp network .