Horde\Socket\Client::close PHP Метод

close() публичный Метод

Close the connection.
public close ( )
    public function close()
    {
        if ($this->connected) {
            @fclose($this->_stream);
            $this->_connected = $this->_secure = false;
            $this->_stream = null;
        }
    }

Usage Example

Пример #1
0
 /**
  * Logs out of the server and terminates the connection.
  *
  * @param boolean $sendLogoutCMD Whether to send LOGOUT command before
  *                               disconnecting.
  *
  * @throws \Horde\ManageSieve\Exception
  */
 protected function _cmdLogout($sendLogoutCMD = true)
 {
     $this->_checkConnected();
     if ($sendLogoutCMD) {
         $this->_doCmd('LOGOUT');
     }
     $this->_sock->close();
     $this->_state = self::STATE_DISCONNECTED;
 }