Skip to content

CURLMOPT_SOCKETFUNCTION.md example uses wrong argument #19840

@greghudson

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions