diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-08-29 14:39:33 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-08-29 14:39:33 +0000 |
commit | 5acadc9cd7a1ff40ffa8d57214c90d8c788b2b03 (patch) | |
tree | 3c417bc272e9a97f8ae763406c8151cea2fa7d74 /lib/connect.c | |
parent | 2ff609dd43cb5c1c0da893c080132a48a2d4c73b (diff) |
David McCreedy added CURLOPT_SOCKOPTFUNCTION and CURLOPT_SOCKOPTDATA to
allow applications to set their own socket options.
Diffstat (limited to 'lib/connect.c')
-rw-r--r-- | lib/connect.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/connect.c b/lib/connect.c index 95fdf8119..4e7f4f8ea 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -702,6 +702,17 @@ singleipconnect(struct connectdata *conn, nosigpipe(conn, sockfd); + if(data->set.fsockopt) { + /* activate callback for setting socket options */ + error = data->set.fsockopt(data->set.sockopt_client, + sockfd, + CURLSOCKTYPE_IPCXN); + if (error) { + sclose(sockfd); /* close the socket and bail out */ + return CURL_SOCKET_BAD; + } + } + /* possibly bind the local end to an IP, interface or port */ res = bindlocal(conn, sockfd); if(res) { |