Documentation

RetrySocketConnector
in package
implements SocketConnector uses ForbidCloning, ForbidSerialization

FinalYes

Table of Contents

Interfaces

SocketConnector

Properties

$delegate  : SocketConnector
$exponentialBackoffBase  : int
$maxAttempts  : int

Methods

__construct()  : mixed
__serialize()  : never
__unserialize()  : never
connect()  : Socket
Establish a socket connection to the specified URI.
__clone()  : mixed

Properties

Methods

__construct()

public __construct(SocketConnector $delegate[, positive-int $maxAttempts = 3 ][, positive-int $exponentialBackoffBase = 2 ]) : mixed
Parameters
$delegate : SocketConnector
$maxAttempts : positive-int = 3
$exponentialBackoffBase : positive-int = 2

__unserialize()

public final __unserialize(array<string|int, mixed> $data) : never
Parameters
$data : array<string|int, mixed>
Return values
never

connect()

Establish a socket connection to the specified URI.

public connect(SocketAddress|string $uri[, ConnectContext|null $context = null ][, Cancellation|null $cancellation = null ]) : Socket
Parameters
$uri : SocketAddress|string

URI in scheme://host:port format. TCP is assumed if no scheme is present.

$context : ConnectContext|null = null

Socket connect context to use when connecting.

$cancellation : Cancellation|null = null
Tags
psalm-suppress

InvalidReturnType

Return values
Socket

        
On this page

Search results