-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
How to properly timeout #2034
Comments
Hi, the piece of code that set the socket option is this: Lines 3744 to 3748 in 282f2fe
The socket use
Your python server is writing a response to the socket each second five times, if you modify the server to sleep Maybe could be a good feature make a timeout different to the |
It could be good that @yhirose mention this on the README file 💯 |
Hi Sebastian, thanks for looking into this. Yes, I figured that, this is
why the test server is sending data by chunks. Libcurl has a "global"
timeout, which in my opinion is a useful thing.
…On Mon, Feb 3, 2025, 02:59 Sebastian Galindo ***@***.***> wrote:
It could be good that @yhirose <https://github.com/yhirose> mention this
on the README file 💯
—
Reply to this email directly, view it on GitHub
<#2034 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEYNNE77TTVS34AJI6B2HD2N3LQRAVCNFSM6AAAAABWAWARK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRZG44DMMZWG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@marcovc could you clarify the status of this issue? If it's not an issue on cpp-httplib, I would like to close it. |
Hi, This is my second and last attempt to point out that there is no way to set a global timeout in httplib (client). If you feel that is not an important feature to have in your library, feel free to close it. Thanks. |
Hi,
I've finally had some time to investigate the issue reported here, and created a small example:
A client that wants to have a reply in at most 2100 ms:
A simple server to test (in python):
It will print something like
Elapsed time: 5001ms
while I was expecting something close to
Elapsed time: 2100ms
Perhaps there is another way to set a timeout for the request?
Thanks
The text was updated successfully, but these errors were encountered: