55.\" * | (__| |_| | _ <| |___
66.\" * \___|\___/|_| \_\_____|
77.\" *
8- .\" * Copyright (C) 1998 - 2018 , Daniel Stenberg, <daniel@haxx.se>, et al.
8+ .\" * Copyright (C) 1998 - 2019 , Daniel Stenberg, <daniel@haxx.se>, et al.
99.\" *
1010.\" * This software is licensed as described in the file COPYING, which
1111.\" * you should have received as part of this distribution. The terms
@@ -43,15 +43,14 @@ libcurl will test the descriptor internally. It is also permissible to pass
4343CURL_SOCKET_TIMEOUT to the \fB sockfd \fP parameter in order to initiate the
4444whole process or when a timeout occurs.
4545
46- At return, \fB running_handles \fP points to the number
47- of running easy handles within the multi handle. When this number reaches
48- zero, all transfers are complete/done. When you call
49- \fI curl_multi_socket_action(3) \fP on a specific socket and the counter
50- decreases by one, it DOES NOT necessarily mean that this exact socket/transfer
51- is the one that completed. Use \fI curl_multi_info_read(3) \fP to figure out
52- which easy handle that completed.
46+ At return, \fB running_handles \fP points to the number of running easy handles
47+ within the multi handle. When this number reaches zero, all transfers are
48+ complete/done. When you call \fI curl_multi_socket_action(3) \fP on a specific
49+ socket and the counter decreases by one, it DOES NOT necessarily mean that
50+ this exact socket/transfer is the one that completed. Use
51+ \fI curl_multi_info_read(3) \fP to figure out which easy handle that completed.
5352
54- The \fI curl_multi_socket_action(3) \fP functions inform the application about
53+ The \fI curl_multi_socket_action(3) \fP function informs the application about
5554updates in the socket (file descriptor) status by doing none, one, or multiple
5655calls to the socket callback function set with the
5756\fI CURLMOPT_SOCKETFUNCTION(3) \fP option to \fI curl_multi_setopt(3) \fP . They
@@ -66,65 +65,6 @@ timeout action: call the \fIcurl_multi_socket_action(3)\fP function with the
6665\fI curl_multi_timeout(3) \fP function to poll the value at any given time, but
6766for an event-based system using the callback is far better than relying on
6867polling the timeout value.
69- .SH "CALLBACK DETAILS"
70-
71- The socket \fB callback \fP function uses a prototype like this
72- .nf
73-
74- int curl_socket_callback(CURL *easy, /* easy handle */
75- curl_socket_t s, /* socket */
76- int action, /* see values below */
77- void *userp, /* private callback pointer */
78- void *socketp); /* private socket pointer,
79- \fB NULL \fP if not
80- previously assigned with
81- \fI curl_multi_assign(3) \fP */
82-
83- .fi
84- The callback MUST return 0.
85-
86- The \fI easy \fP argument is a pointer to the easy handle that deals with this
87- particular socket. Note that a single handle may work with several sockets
88- simultaneously.
89-
90- The \fI s \fP argument is the actual socket value as you use it within your
91- system.
92-
93- The \fI action \fP argument to the callback has one of five values:
94- .RS
95- .IP " CURL_POLL_NONE (0)"
96- register, not interested in readiness (yet)
97- .IP " CURL_POLL_IN (1)"
98- register, interested in read readiness
99- .IP " CURL_POLL_OUT (2)"
100- register, interested in write readiness
101- .IP " CURL_POLL_INOUT (3)"
102- register, interested in both read and write readiness
103- .IP " CURL_POLL_REMOVE (4)"
104- unregister
105- .RE
106-
107- The \fI socketp \fP argument is a private pointer you have previously set with
108- \fI curl_multi_assign(3) \fP to be associated with the \fI s \fP socket. If no
109- pointer has been set, socketp will be NULL. This argument is of course a
110- service to applications that want to keep certain data or structs that are
111- strictly associated to the given socket.
112-
113- The \fI userp \fP argument is a private pointer you have previously set with
114- \fI curl_multi_setopt(3) \fP and the \fI CURLMOPT_SOCKETDATA(3) \fP option.
115- .SH "RETURN VALUE"
116- CURLMcode type, general libcurl multi interface error code.
117-
118- Before version 7.20.0: If you receive \fI CURLM_CALL_MULTI_PERFORM \fP , this
119- basically means that you should call \fI curl_multi_socket_action(3) \fP again
120- before you wait for more actions on libcurl's sockets. You don't have to do it
121- immediately, but the return code means that libcurl may have more data
122- available to return or that there may be more data to send off before it is
123- "satisfied".
124-
125- The return code from this function is for the whole multi stack. Problems
126- still might have occurred on individual transfers even when one of these
127- functions return OK.
12868.SH "TYPICAL USAGE"
129691. Create a multi handle
13070
0 commit comments