Skip to content

CURLMOPT_SOCKETFUNCTION.md example uses wrong argument #19840

Closed

Description

@greghudson

Specify which documentation you found a problem with

CURLMOPT_SOCKETFUNCTION (https://curl.se/libcurl/c/CURLMOPT_SOCKETFUNCTION.html)

The problem

The callback for CURLMOPT_SOCKETFUNCTION receives two application-supplied data pointers, named clientp and socketp. The documentation says that clientp is set with CURLMOPT_SOCKETDATA and socketp is set with curl_multi_assign().

The example code does not use curl_multi_assign(), but its callback function uses socketp (called sockp in the function) to get the struct priv pointer instead of clientp (cbp) as I would expect.

Activity

  1. self-assigned this
    on Dec 4, 2025
  2. added a commit that references this issue on Dec 4, 2025
    354aaa9
  3. added a commit that references this issue on Dec 4, 2025
    a153126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions