Open
Description
Hello,
I am making an async request, and while waiting for the response, I want to do other work. In my case, it's calling a check heartbeat function in rabbitmq, so I don't lose the connection while my request is processing - related to what I wrote at the bottom of #6. I am using a pattern like:
while (true)
{
if ($client->hasResponse($requestId))
{
$client->handleResponse($requestId);
break;
}
// do other work here
}
What I noticed is that in hasResponse, Socket::STREAM_SELECT_USEC is 20000 microseconds, which is a little quick for what I need. I would prefer to wait a little longer each iteration as the check heartbeat function doesn't need to run that often.
Would it be possible to allow the user to change STREAM_SELECT_USEC to be another value? Right now it's a constant, so it can't be changed.
Thanks again for your help.