mirror of
https://github.com/curl/curl.git
synced 2026-07-30 12:18:08 +03:00
ftp: active conn, allow application to set sockopt after accept() call
For active FTP connections, applications may need setting the sockopt after accept() call returns successful. This fix gives a call to the callback registered with CURL_SOCKOPTFUNCTION option. Also a new sock type - CURLSOCKTYPE_ACCEPT - is added. This type is to be passed to application callbacks with - purpose - parameter. Applications may use this parameter to distinguish between socket types.
This commit is contained in:
parent
44154e0733
commit
23ef5e4ba2
2 changed files with 17 additions and 2 deletions
|
|
@ -309,8 +309,9 @@ typedef size_t (*curl_read_callback)(char *buffer,
|
|||
void *instream);
|
||||
|
||||
typedef enum {
|
||||
CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
|
||||
CURLSOCKTYPE_LAST /* never use */
|
||||
CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
|
||||
CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
|
||||
CURLSOCKTYPE_LAST /* never use */
|
||||
} curlsocktype;
|
||||
|
||||
/* The return code from the sockopt_callback can signal information back
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue