aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-08-29 14:39:33 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-08-29 14:39:33 +0000
commit5acadc9cd7a1ff40ffa8d57214c90d8c788b2b03 (patch)
tree3c417bc272e9a97f8ae763406c8151cea2fa7d74 /lib/url.c
parent2ff609dd43cb5c1c0da893c080132a48a2d4c73b (diff)
David McCreedy added CURLOPT_SOCKOPTFUNCTION and CURLOPT_SOCKOPTDATA to
allow applications to set their own socket options.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index c0641c78b..17f543615 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1551,6 +1551,20 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->set.ftp_alternative_to_user = va_arg(param, char *);
break;
+ case CURLOPT_SOCKOPTFUNCTION:
+ /*
+ * socket callback function: called after socket() but before connect()
+ */
+ data->set.fsockopt = va_arg(param, curl_sockopt_callback);
+ break;
+
+ case CURLOPT_SOCKOPTDATA:
+ /*
+ * socket callback data pointer. Might be NULL.
+ */
+ data->set.sockopt_client = va_arg(param, void *);
+ break;
+
default:
/* unknown tag and its companion, just ignore: */
result = CURLE_FAILED_INIT; /* correct this */