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 34
__construct()
No description
at line 47
ProvidesResponseData
sendRequest(ConfiguresSocketConnection $connection, ProvidesRequestData $request)
No description
at line 64
int
sendAsyncRequest(ConfiguresSocketConnection $connection, ProvidesRequestData $request)
No description
at line 95
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 119
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 148
ProvidesResponseData
readResponse(int $socketId, int|null $timeoutMs = null)
No description
at line 169
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 195
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 255
bool
hasUnhandledResponses()
No description
at line 263
bool
hasResponse(int $socketId)
No description
at line 272
array
getSocketIdsHavingResponse()
No description
at line 310
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 339
Generator
readReadyResponses(int|null $timeoutMs = null)
No description
at line 352
void
handleResponse(int $socketId, int|null $timeoutMs = null)
No description
at line 365
void
handleResponses(int|null $timeoutMs = null, int ...$socketIds)
No description
at line 376
void
handleReadyResponses(int|null $timeoutMs = null)
No description