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

Cannot get the paused state of curl easy handle. #2588

Closed
basuke opened this Issue May 18, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@basuke
Contributor

basuke commented May 18, 2018

Background

We need to pause/unpause the connection. Actual connection is handled in worker thread.

Problem

When main thread request pause/unpause, the event is dispatched into worker thread. At this moment, I need to know whether curl handle is paused or not to avoid unnecessary curl_easy_pause() which end up of calling of Curl_updatesocket(). Currently we manage that by flag aside with easy handle but ideally it's better to get the information from curl handle.

I expected the following

CURLcode curl_easy_get_paused(easy, &state);

or

CURLcode curl_easy_getinfo(easy, CURLINFO_PAUSE_STATE, &state);

curl/libcurl version

libcurl 7.60.0

operating system

Windows 10 / FreeBSD

@basuke

This comment has been minimized.

Contributor

basuke commented May 18, 2018

If I implement this one, which is better? adding new function or add to getinfo?

@bagder

This comment has been minimized.

Member

bagder commented May 19, 2018

I prefer curl_easy_getinfo, since that makes it easier for applications to soft-fail in run-time if this ability isn't present in their particular version of the library...

@bagder

This comment has been minimized.

Member

bagder commented May 24, 2018

Thanks, but this description sounds as if you're asking for a new feature/change. We use this tracker for bugs and issues only, we put ideas to work on in the future in the TODO document. We basically drown in good ideas so they don't do much use in our tracker.

If you really want to see this happen, start working on an implementation and submit a PR for it or join the mailing list and talk up more interest for it and see what help from others you can get!

@bagder bagder closed this in 49fe65c May 24, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Aug 22, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.