Closed marioshtika closed 4 years ago
You can set Context for connect() method
$connectContext = (new ConnectContext)->withConnectTimeout(1000); // 1sec
/** @var \Amp\Socket\ClientSocket $socket */
$socket = yield connect($request->getUri(), $connectContext);
but connect timeout and read timeout are different things.
Closing this ticket atm. PhpAmp library related questions are better to be asked at their repo.
Hello @aldas ,
I am using your example on parallel request with amp. I am trying to simultaneously connect and read multiple units.
Some of the request are giving me the below error
In the low level I am using the
->setReadTimeoutSec(20)
command. Is there a way to do the same in the higher level?Thank you in advance.