Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,13 @@ $transport = new HttpTransport(
- `requestFactory` (RequestFactoryInterface|null): PSR-17 request factory (auto-discovered)
- `streamFactory` (StreamFactoryInterface|null): PSR-17 stream factory (auto-discovered)
- `logger` (LoggerInterface|null): Optional PSR-3 logger
- `maxSseBufferBytes` (int): Maximum bytes buffered for one incomplete SSE event (default: 8 MiB)
- `maxReconnectAttempts` (int): Maximum GET attempts to resume an interrupted SSE stream (default: 5)
- `initialReconnectDelayMs` (int): Initial fallback delay when the server sends no `retry` field (default: 1000 ms)
- `maxReconnectDelayMs` (int): Cap for the fallback exponential backoff (default: 10000 ms)
- `clock` (callable|null): Optional monotonic millisecond clock, primarily for deterministic tests

When an SSE connection closes before its JSON-RPC response arrives, the transport resumes it with a GET request carrying the latest `Last-Event-ID`. A server-provided SSE `retry` value controls the delay; otherwise the fallback delay doubles from 1 second up to 10 seconds. Completed requests and explicitly closed transports are not reconnected.

**PSR-18 Auto-Discovery:**

Expand Down
Loading
Loading