Client
class Client
Methods
No description
No description
Sends the request like sendRequest(), but retries on another socket if writing the request to the socket failed.
Sends the request like sendAsyncRequest(), but retries on another socket if writing the request to the socket failed.
No description
Waits until the response is received and notifies the response callbacks of the request.
Waits until all responses are received and notifies the callbacks of their requests.
No description
No description
No description
Reads the responses of the given sockets in the given order. Unknown socket IDs are skipped.
No description
No description
No description
No description
Details
at line 33
__construct()
No description
at line 46
ProvidesResponseData
sendRequest(ConfiguresSocketConnection $connection, ProvidesRequestData $request)
No description
at line 63
int
sendAsyncRequest(ConfiguresSocketConnection $connection, ProvidesRequestData $request)
No description
at line 94
ProvidesResponseData
tryRequest(ConfiguresSocketConnection $connection, ProvidesRequestData $request, int $maxTries = 5)
Sends the request like sendRequest(), but retries on another socket if writing the request to the socket failed.
Failures while reading the response are not retried, because the request may already have been processed.
at line 118
int
tryAsyncRequest(ConfiguresSocketConnection $connection, ProvidesRequestData $request, int $maxTries = 5)
Sends the request like sendAsyncRequest(), but retries on another socket if writing the request to the socket failed.
at line 147
ProvidesResponseData
readResponse(int $socketId, int|null $timeoutMs = null)
No description
at line 168
void
waitForResponse(int $socketId, int|null $timeoutMs = null)
Waits until the response is received and notifies the response callbacks of the request.
If there is no response within the timeout (default: the read/write timeout of the connection), the failure callbacks are notified with a TimedoutException.
at line 194
void
waitForResponses(int|null $timeoutMs = null)
Waits until all responses are received and notifies the callbacks of their requests.
Requests without response within the timeout (default: the read/write timeout of their connection) notify their failure callbacks with a TimedoutException.
at line 254
bool
hasUnhandledResponses()
No description
at line 262
bool
hasResponse(int $socketId)
No description
at line 271
array
getSocketIdsHavingResponse()
No description
at line 317
Generator
readResponses(int|null $timeoutMs = null, int ...$socketIds)
Reads the responses of the given sockets in the given order. Unknown socket IDs are skipped.
If a response cannot be read, its exception is thrown and the remaining responses are not read.
at line 346
Generator
readReadyResponses(int|null $timeoutMs = null)
No description
at line 359
void
handleResponse(int $socketId, int|null $timeoutMs = null)
No description
at line 372
void
handleResponses(int|null $timeoutMs = null, int ...$socketIds)
No description
at line 383
void
handleReadyResponses(int|null $timeoutMs = null)
No description