From 088ba97a2471c97e90fe7153dff0ce119faab4ef Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 5 Dec 2011 11:42:10 +0100 Subject: FTP: call opensocket callback properly When the new socket is created for an active connection, it is now done using the open socket callback. Test case 596 was modified to run fine, although it hides the fact that the close callback is still called too many times, as it also gets called for closing sockets that were created with accept(). --- docs/libcurl/curl_easy_setopt.3 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3 index 29151802f..2f7e40e26 100644 --- a/docs/libcurl/curl_easy_setopt.3 +++ b/docs/libcurl/curl_easy_setopt.3 @@ -294,10 +294,9 @@ argument in the sockopt callback set with \fICURLOPT_SOCKOPTFUNCTION\fP. Function pointer that should match the \fIcurl_opensocket_callback\fP prototype found in \fI\fP. This function gets called by libcurl instead of the \fIsocket(2)\fP call. The callback's \fIpurpose\fP argument -identifies the exact purpose for this particular socket, and currently only -one value is supported: \fICURLSOCKTYPE_IPCXN\fP for the primary connection -(meaning the control connection in the FTP case). Future versions of libcurl -may support more purposes. It passes the resolved peer address as a +identifies the exact purpose for this particular socket: +\fICURLSOCKTYPE_IPCXN\fP is for IP based connections. Future versions of +libcurl may support more purposes. It passes the resolved peer address as a \fIaddress\fP argument so the callback can modify the address or refuse to connect at all. The callback function should return the socket or \fICURL_SOCKET_BAD\fP in case no connection should be established or any error -- cgit v1.2.3