ReconnectPolicy
FinalYes
How HttpTransport resumes an SSE stream that closed before its response arrived.
A server-provided SSE retry value sets the delay. Without one, the delay
starts at the initial delay and doubles after each failed attempt, up to the
maximum delay.
Tags
Table of Contents
Properties
- $initialDelayMs : int
- $maxAttempts : int
- $maxDelayMs : int
Methods
- __construct() : mixed
- delayMs() : int
- Delay before the next attempt after the given number of consecutive failed ones.
Properties
$initialDelayMs read-only
public
int
$initialDelayMs
= 1000
$maxAttempts read-only
public
int
$maxAttempts
= 5
$maxDelayMs read-only
public
int
$maxDelayMs
= 10000
Methods
__construct()
public
__construct([int $maxAttempts = 5 ][, int $initialDelayMs = 1000 ][, int $maxDelayMs = 10000 ]) : mixed
Parameters
- $maxAttempts : int = 5
-
Consecutive failed GET attempts before the request fails. Zero disables resumption.
- $initialDelayMs : int = 1000
-
Delay before the first attempt when the server sent no
retryfield - $maxDelayMs : int = 10000
-
Cap for the client-selected delay. A server-provided
retryvalue is not capped.
delayMs()
Delay before the next attempt after the given number of consecutive failed ones.
public
delayMs(int $failedAttempts[, int|null $serverRetryMs = null ]) : int
Parameters
- $failedAttempts : int
- $serverRetryMs : int|null = null