Close connection.

@param mixed $data
@param bool  $raw
@return bool
18572
public function close($data = null, $raw = false)
    {
        if ($data !== null) {
            $this->send($data, $raw);
        }
        return true;
    }
874208
protected function disconnect($quit = true)
        {
            if ($quit) {
                $this->quit();
            }
            if ($this->connected()) {
                $this->debug('Closing socket to ' . $this->host);
                fclose($this->socket);
            }
            $this->host = null;
            $this->reset_state();
        }
1200270
private function disconnect()
    {
        $r = $this->write('QUIT');

        fclose($this->sock);

        $this->sock = null;

        return $r;
    }
169407
public function close($realClose = false)
    {
        $this->arg = null;
        $this->flag &= ~self::FLAG_BUSY;
        if ($realClose === true) {
            Client::debug('close conn \'', $this->conn, '\': ', $this->sock);
            $this->flag &= ~self::FLAG_OPENED;
            @fclose($this->sock);
            $this->delSockRef();
            $this->sock = false;
        } else {
            Client::debug('free conn \'', $this->conn, '\': ', $this->sock);
        }
    }
798451
public function destroy($removeData = false)
    {
        if ($removeData) {
            if (!empty($this->sessionId)) {
                foreach ($this->memory as $key => $value) {
                    if (0 === strpos($key, $this->sessionId . '#')) {
                        unset($this->memory[$key]);
                    }
                }
            } else {
                $this->memory = [];
            }
        }

        $this->started = false;

        return true;
    }
586055
public function execute( $query, $rawData = false ) {

    if ( strlen( $query ) > self::MAX_GET_SIZE ) {
      // big requests go to POST
      $this->method = 'POST';
    }

    $client = new Client();

    $response = $client->request( $this->method, self::SPARQL_ENDPOINT, [
        'query' => [ 
          "query" => $query, 
          "format" => "json",
          "maxQueryTimeMillis" => $this->timeout * 1000
        ]
    ]);

    $status = $response->getStatusCode();

    if ( $status != '200' ) {
      throw new Exception( 'HTTP Error' );
    }

    $result = $response->getBody();

    $data = json_decode( $result, true );
    
    if ( $data === null || $data === false ) {
      throw new Exception( "HTTP request failed, response:\n" .
        substr( $result, 1024 ) );
    }

    return $this->extractData( $data, $rawData );
  }
497935
public function close()
    {
        $this->error = array();
        $this->helo_rply = null;
        if (is_resource($this->smtp_conn)) {
            // close the connection and cleanup
            fclose($this->smtp_conn);
            if ($this->do_debug >= 3) {
                $this->edebug('Connection: closed');
            }
        }
    }
1290504
public function close()
    {
        $contents = ob_get_clean();
        header("Connection: close\r\n");
        header("Content-Encoding: none\r\n");
        ignore_user_abort(true);
        ob_start();
        echo $contents;
        $size = ob_get_length();
        header("Content-Length: $size");
        if(function_exists('fastcgi_finish_request'))
            fastcgi_finish_request();
        ob_end_flush();
        flush();
        ob_end_clean();
    }
1019880
public function close()
    {
        if (is_resource($this->socket)) {
            Debug::Log(Debug::DEBUG, 'socket_close()');
            return fclose($this->socket);
        }

        return true;
    }
605628
public function closeConnection($alias = null)
    {
        if (! $alias) {
            foreach ($this->getDatabases() as $alias => $database) {
                $this->closeConnection($alias);
            }
        } else {
            $database = $this->getDatabase($alias, Database::TARGET_MASTER);
            $database->disconnect();
        }
    }
950986
public function disconnect() {
    if ($this->connected) {
      if (is_resource($this->link)) {
        pg_close($this->link);
      }
      $this->connected = false;
    }
    return $this->connected;
  }
334335
function _close()
	{
		if(is_object($this->_queryID)) {
			$rez = sqlsrv_free_stmt($this->_queryID);
			$this->_queryID = false;
			return $rez;
		}
		return true;
	}
800625
public function delete( $key, $raw = false ) {
		return \delete_site_transient( $raw ? $key : $this->get_key( $key ) );
	}
601780
public function handler_write($id, $data) {
        if (is_null($this->connection)) {
            // The session has already been closed, don't attempt another write.
            error_log('Tried to write session: '.$id.' before open or after close.');
            return false;
        }

        // We do not do locking here because memcached doesn't.  Also
        // PHP does open, read, destroy, write, close. When a session doesn't exist.
        // There can be race conditions on new sessions racing each other but we can
        // address that in the future.
        try {
            $this->connection->setex($id, $this->timeout, $data);
        } catch (RedisException $e) {
            error_log('Failed talking to redis: '.$e->getMessage());
            return false;
        }
        return true;
    }
1123351
def close(self):
        
        if not self._content_consumed:
            self.raw.close()

        release_conn = getattr(self.raw, 'release_conn', None)
        if release_conn is not None:
            release_conn()
2995
public function disconnect()
    {
        if (is_resource($this->curl)) {
            curl_close($this->curl);
        }
        $this->curl = null;
    }
624083
function Close()
	{
		$this->Observe("DataAdapter ($this->_label) Closing Connection...",OBSERVE_DEBUG);
		
		if ($this->_dbopen)
		{
			$this->_driver->Close($this->_dbconn); // ignore warnings
			$this->_dbopen = false;
			$this->Observe("DataAdapter ($this->_label) Connection Closed",OBSERVE_DEBUG);
		}
		else
		{
			$this->Observe("DataAdapter ($this->_label) Connection Not Open",OBSERVE_DEBUG);
		}
	}