Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable stream select #77

Open
wants to merge 8 commits into
base: 4.x-dev
Choose a base branch
from

Conversation

sanderdlm
Copy link

Attempted fix for #18. Implemented option 3 from this comment. This timeout now also applies to the multi requests since the getSocketIdsHavingResponse has been reworked to simply use hasResponse in a loop. This is slower than using stream_select on all resources at the same time, but the only way to accurately determine which sockets have responses.

Tried to figure out a test, but couldn't find way to get a socket/check it's timeout just by having the ID. Should we make a basic getSocketById method publicly available? Or $client->sockets->getById?

Sander De la Marche added 8 commits March 27, 2023 17:19
Passing a string to any Request is deprecated in 4.x
This method had a bug where, as long as no error was thrown, or timeout
reached, it would report that all sockets inside a collection had responses
even if some of them did not. Checking each socket individually in a loop
is a performance hit, but the only way to report accuratly if a socket
has a response ready.
…quests

This will be passed to the socket as soon as the request is sent. The polling timeout
will then be used by the hasResponse method, which uses stream_select
@sanderdlm sanderdlm changed the base branch from master to 4.x-dev March 28, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant