summaryrefslogtreecommitdiff
path: root/docs/libcurl/opts/GNURLMOPT_SOCKETFUNCTION.3
diff options
context:
space:
mode:
Diffstat (limited to 'docs/libcurl/opts/GNURLMOPT_SOCKETFUNCTION.3')
-rw-r--r--docs/libcurl/opts/GNURLMOPT_SOCKETFUNCTION.326
1 files changed, 18 insertions, 8 deletions
diff --git a/docs/libcurl/opts/GNURLMOPT_SOCKETFUNCTION.3 b/docs/libcurl/opts/GNURLMOPT_SOCKETFUNCTION.3
index 108f8eaa6..cd7b49dce 100644
--- a/docs/libcurl/opts/GNURLMOPT_SOCKETFUNCTION.3
+++ b/docs/libcurl/opts/GNURLMOPT_SOCKETFUNCTION.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2019, 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
@@ -38,14 +38,24 @@ CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_SOCKETFUNCTION, socket_callb
Pass a pointer to your callback function, which should match the prototype
shown above.
-When the \fIcurl_multi_socket_action(3)\fP function runs, it informs the
+When the \fIcurl_multi_socket_action(3)\fP function is called, it informs the
application about updates in the socket (file descriptor) status by doing
-none, one, or multiple calls to the \fBsocket_callback\fP. The callback gets
-status updates with changes since the previous time the callback was called.
-If the given callback pointer is NULL, no callback will be called. Set the
-callback's \fBuserp\fP argument with \fICURLMOPT_SOCKETDATA(3)\fP. See
-\fIcurl_multi_socket_action(3)\fP for more details on how the callback is used
-and should work.
+none, one, or multiple calls to the \fBsocket_callback\fP. The callback
+function gets status updates with changes since the previous time the callback
+was called. If the given callback pointer is set to NULL, no callback will be
+called.
+.SH "CALLBACK ARGUMENTS"
+\fIeasy\fP identifies the specific transfer for which this update is related.
+
+\fIs\fP is the specific socket this function invocation concerns. If the
+\fBwhat\fP argument is not CURL_POLL_REMOVE then it holds information about
+what activity on this socket the application is supposed to
+monitor. Subsequent calls to this callback might update the \fBwhat\fP bits
+for a socket that is already monitored.
+
+\fBuserp\fP is set with \fICURLMOPT_SOCKETDATA(3)\fP.
+
+\fBsocketp\fP is set with \fIcurl_multi_assign(3)\fP or will be NULL.
The \fBwhat\fP parameter informs the callback on the status of the given
socket. It can hold one of these values: