Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
46a886cd
Commit
46a886cd
authored
10 years ago
by
Dan Fandrich
Browse files
Options
Downloads
Patches
Plain Diff
opts: Document the socket callback function parameters
parent
1b6bc02f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
+3
-0
3 additions, 0 deletions
docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
+9
-5
9 additions, 5 deletions
docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
with
12 additions
and
5 deletions
docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
+
3
−
0
View file @
46a886cd
...
...
@@ -57,6 +57,9 @@ and \fICURLSOCKTYPE_ACCEPT\fP is for sockets created after accept() - such as
when doing active FTP. Future versions of libcurl may support more
purposes.
The \fIclientp\fP pointer contains whatever user-defined value set using the
\fICURLOPT_OPENSOCKETDATA\fP function.
The callback gets the resolved peer address as the \fIaddress\fP argument and
is allowed to modify the address or refuse to connect completely. The callback
function should return the newly created socket or \fICURL_SOCKET_BAD\fP in
...
...
This diff is collapsed.
Click to expand it.
docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
+
9
−
5
View file @
46a886cd
...
...
@@ -57,12 +57,16 @@ exact purpose for this particular socket:
(in earlier versions these sockets weren't passed to this callback).
Future versions of libcurl may support more purposes. libcurl passes the newly
created socket descriptor to the callback so additional setsockopt() calls can
be done at the user's discretion. Return \fICURL_SOCKOPT_OK\fP from the
callback on success. Return \fICURL_SOCKOPT_ERROR\fP from the callback
function to signal an unrecoverable error to the library and it will close the
socket and return \fICURLE_COULDNT_CONNECT\fP.
created socket descriptor to the callback in the \fIcurlfd\fP parameter so
additional setsockopt() calls can be done at the user's discretion.
The \fIclientp\fP pointer contains whatever user-defined value set using the
\fICURLOPT_SOCKOPTDATA\fP function.
Return \fICURL_SOCKOPT_OK\fP from the callback on success. Return
\fICURL_SOCKOPT_ERROR\fP from the callback function to signal an unrecoverable
error to the library and it will close the socket and return
\fICURLE_COULDNT_CONNECT\fP.
Alternatively, the callback function can return
\fICURL_SOCKOPT_ALREADY_CONNECTED\fP, to tell libcurl that the socket is
already connected and then libcurl will not attempt to connect it. This allows
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment