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

Time Out Question #104

Closed
dashuaige2000 opened this issue Jul 22, 2017 · 1 comment
Closed

Time Out Question #104

dashuaige2000 opened this issue Jul 22, 2017 · 1 comment

Comments

@dashuaige2000
Copy link

http-client How to set time out
I am Chinese, My English is not good Please understand

@clue
Copy link
Member

clue commented Jul 22, 2017

See also issue #28. It depends on what you want to do after the timeout is reached, but this should get you started:

$request = $client->request(…);
$request->end();

$loop->addTimer(5.0, function () use ($request) {
    $request->close();
});

I hope this helps 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants