RetrySocketConnector
in package
implements
SocketConnector
uses
ForbidCloning, ForbidSerialization
FinalYes
Table of Contents
Interfaces
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
$delegate read-only
private
SocketConnector
$delegate
$exponentialBackoffBase read-only
private
int
$exponentialBackoffBase
= 2
$maxAttempts read-only
private
int
$maxAttempts
= 3
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
__serialize()
public
final __serialize() : never
Return values
never__unserialize()
public
final __unserialize(array<string|int, mixed> $data) : never
Parameters
- $data : array<string|int, mixed>
Return values
neverconnect()
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
Return values
Socket__clone()
protected
final __clone() : mixed