Skip to content

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

Closed

Description

@basuke

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

Activity

  1. basuke commented on May 18, 2018

    @basuke
    ContributorAuthor

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

  2. bagder commented on May 19, 2018

    @bagder
    Member

    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...

  3. bagder commented on May 24, 2018

    @bagder
    Member

    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!

  4. locked as resolved and limited conversation to collaborators on Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions