\Yurun\Util\YurunHttp\Handler\SwooleHttp2ConnectionManager

Summary

Methods
Properties
Constants
getConnection()
removeConnection()
closeConnection()
close()
createConnection()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
getKey()
$connections
$sslConnections
N/A

Properties

$connections

$connections : array<mixed,\Swoole\Coroutine\Http\Client>|array<mixed,\Swoole\Coroutine\Http2\Client>

连接对象

Type

array<mixed,\Swoole\Coroutine\Http\Client>|array<mixed,\Swoole\Coroutine\Http2\Client>

$sslConnections

$sslConnections : array<mixed,\Swoole\Coroutine\Http\Client>|array<mixed,\Swoole\Coroutine\Http2\Client>

SSL 连接对象

Type

array<mixed,\Swoole\Coroutine\Http\Client>|array<mixed,\Swoole\Coroutine\Http2\Client>

Methods

getConnection()

getConnection(string  $host, integer  $port, boolean  $ssl) : \Swoole\Coroutine\Http\Client|\Swoole\Coroutine\Http2\Client

获取连接

Parameters

string $host
integer $port
boolean $ssl

Returns

\Swoole\Coroutine\Http\Client|\Swoole\Coroutine\Http2\Client

removeConnection()

removeConnection(string  $host, integer  $port, boolean  $ssl) : \Swoole\Coroutine\Http\Client|\Swoole\Coroutine\Http2\Client|boolean

将指定连接从本管理器中移除,但不会关闭该连接

Parameters

string $host
integer $port
boolean $ssl

Returns

\Swoole\Coroutine\Http\Client|\Swoole\Coroutine\Http2\Client|boolean

closeConnection()

closeConnection(string  $host, integer  $port, boolean  $ssl) : boolean

关闭指定连接

Parameters

string $host
integer $port
boolean $ssl

Returns

boolean

close()

close() : void

关闭连接管理器

createConnection()

createConnection(string  $host, integer  $port, boolean  $ssl) : \Swoole\Coroutine\Http2\Client

创建新连接,但不归本管理器管理

Parameters

string $host
integer $port
boolean $ssl

Returns

\Swoole\Coroutine\Http2\Client

getKey()

getKey(  $host,   $port) 

Parameters

$host
$port