aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.33
-rw-r--r--docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.314
2 files changed, 12 insertions, 5 deletions
diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
index bff7283e3..9977f0700 100644
--- a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
@@ -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
diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
index 51eefa1fc..272650fda 100644
--- a/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
@@ -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