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
9f2f8d51
Commit
9f2f8d51
authored
13 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
multi docs: extended the multi_socket API description
parent
bd158607
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/libcurl/libcurl-multi.3
+27
-8
27 additions, 8 deletions
docs/libcurl/libcurl-multi.3
with
27 additions
and
8 deletions
docs/libcurl/libcurl-multi.3
+
27
−
8
View file @
9f2f8d51
...
...
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 201
0
, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 201
1
, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
...
...
@@ -118,13 +118,32 @@ If you want to re-use an easy handle that was added to the multi handle for
transfer, you must first remove it from the multi stack and then re-add it
again (possibly after having altered some options at your own choice).
.SH "MULTI_SOCKET"
Since 7.16.0, the \fIcurl_multi_socket_action(3)\fP function offers a way for
applications to not only avoid being forced to use select(), but it also
offers a much more high-performance API that will make a significant
difference for applications using large numbers of simultaneous connections.
\fIcurl_multi_socket_action(3)\fP is then used
instead of \fIcurl_multi_perform(3)\fP.
\fIcurl_multi_socket_action(3)\fP function offers a way for applications to
not only avoid being forced to use select(), but it also offers a much more
high-performance API that will make a significant difference for applications
using large numbers of simultaneous connections.
\fIcurl_multi_socket_action(3)\fP is then used instead of
\fIcurl_multi_perform(3)\fP.
When using this API, you add easy handles to the multi handle just as with the
normal multi interface. Then you also set two callbacks with the
CURLMOPT_SOCKETFUNCTION and CURLMOPT_TIMERFUNCTION options to
\fIcurl_multi_setopt(3)\fP.
The API is then designed to inform your application about which sockets
libcurl is currently using and for what activities (read and/or write) on
those sockets your application is expected to wait for.
Your application must then make sure to receive all sockets informed about in
the CURLMOPT_SOCKETFUNCTION callback and make sure it reacts on the given
activity on them. When a socket has the given activity, you call
\fIcurl_multi_socket_action(3)\fP specifying which socket and action there
are.
The CURLMOPT_TIMERFUNCTION callback is called to set a timeout. When that
timeout expires, your application should call the
\fIcurl_multi_socket_action(3)\fP function saying it was due to a timeout.
.SH "BLOCKING"
A few areas in the code are still using blocking code, even when used from the
multi interface. While we certainly want and intend for these to get fixed in
...
...
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