Connect Manager

ConnectionOptions

FinalYes

Опции открытия и эксплуатации соединения.

Tags
SuppressWarnings

("PHPMD.BooleanArgumentFlag")

("PHPMD.LongVariable")

("PHPMD.ExcessiveParameterList")

("PHPMD.TooManyPublicMethods")

("PHPMD.CyclomaticComplexity")

Table of Contents

Methods

__construct()  : mixed
allowInsecure()  : bool
Разрешён ли небезопасный plaintext.
allowPrivateAddresses()  : self
Копия с отключённой блокировкой частных адресов (для тестов/localhost).
auth()  : AuthCredentials|null
Учётные данные или null.
blockPrivateAddresses()  : bool
Блокируются ли частные адреса.
connectTimeout()  : float
Возвращает таймаут connect.
defaults()  : self
Создаёт опции с безопасными значениями по умолчанию.
ioTimeout()  : float
Возвращает таймаут I/O.
mode()  : string
Режим sync|async.
streamContext()  : array<string, mixed>
Доп. контекст stream.
verifyPeer()  : bool
Нужна ли проверка TLS peer.
withAuth()  : self
Копия с учётными данными.
withMode()  : self
Копия с другим режимом.
withTlsPeerName()  : self
Копия с TLS peer_name / SNI для IP-pinned connect.

Methods

__construct()

public __construct([float $connectTimeout = 5.0 ][, float $ioTimeout = 30.0 ][, bool $verifyPeer = true ][, bool $blockPrivateAddresses = true ][, bool $allowInsecure = false ][, array<string, mixed> $streamContext = [] ][, string $mode = 'sync' ][, AuthCredentials|null $auth = null ]) : mixed
Parameters
$connectTimeout : float = 5.0
$ioTimeout : float = 30.0
$verifyPeer : bool = true
$blockPrivateAddresses : bool = true
$allowInsecure : bool = false
$streamContext : array<string, mixed> = []
$mode : string = 'sync'
$auth : AuthCredentials|null = null

allowInsecure()

Разрешён ли небезопасный plaintext.

public allowInsecure() : bool
Return values
bool

allowPrivateAddresses()

Копия с отключённой блокировкой частных адресов (для тестов/localhost).

public allowPrivateAddresses() : self
Return values
self

blockPrivateAddresses()

Блокируются ли частные адреса.

public blockPrivateAddresses() : bool
Return values
bool

connectTimeout()

Возвращает таймаут connect.

public connectTimeout() : float
Return values
float

defaults()

Создаёт опции с безопасными значениями по умолчанию.

public static defaults() : self
Return values
self

ioTimeout()

Возвращает таймаут I/O.

public ioTimeout() : float
Return values
float

streamContext()

Доп. контекст stream.

public streamContext() : array<string, mixed>
Return values
array<string, mixed>

verifyPeer()

Нужна ли проверка TLS peer.

public verifyPeer() : bool
Return values
bool

withMode()

Копия с другим режимом.

public withMode(string $mode) : self
Parameters
$mode : string
Return values
self

withTlsPeerName()

Копия с TLS peer_name / SNI для IP-pinned connect.

public withTlsPeerName(string $peerName) : self
Parameters
$peerName : string
Return values
self
On this page

Search results