diff --git a/curl-helper.c b/curl-helper.c index b749170..ff28a40 100644 --- a/curl-helper.c +++ b/curl-helper.c @@ -105,7 +105,7 @@ typedef enum OcamlValues Ocaml_IOCTLFUNCTION, Ocaml_SEEKFUNCTION, Ocaml_OPENSOCKETFUNCTION, - Ocaml_CLOSESOCKETFUNCTION, + /* Ocaml_CLOSESOCKETFUNCTION, */ Ocaml_SSH_KEYFUNCTION, Ocaml_ERRORBUFFER, @@ -1183,6 +1183,7 @@ static int cb_OPENSOCKETFUNCTION(void *data, return ((sock == -1) ? CURL_SOCKET_BAD : sock); } +/* static int cb_CLOSESOCKETFUNCTION(void *data, curl_socket_t socket) { @@ -1203,6 +1204,7 @@ static int cb_CLOSESOCKETFUNCTION(void *data, caml_enter_blocking_section(); return result; } +*/ static int cb_SSH_KEYFUNCTION(CURL *easy, const struct curl_khkey *knownkey, @@ -1575,7 +1577,7 @@ SETOPT_FUNCTION( IOCTL) #endif SETOPT_FUNCTION( OPENSOCKET) -SETOPT_FUNCTION( CLOSESOCKET) +/* SETOPT_FUNCTION( CLOSESOCKET) */ static void handle_slist(Connection *conn, struct curl_slist** slist, CURLoption curl_option, value option) { @@ -3612,7 +3614,7 @@ CURLOptionMapping implementedOptionMap[] = HAVENOT(AUTOREFERER), #endif HAVE(OPENSOCKETFUNCTION), - HAVE(CLOSESOCKETFUNCTION), + /*HAVE(CLOSESOCKETFUNCTION),*/ #if HAVE_DECL_CURLOPT_PROXYTYPE HAVE(PROXYTYPE), #else diff --git a/curl.ml b/curl.ml index 02f4a3f..f7d1d54 100644 --- a/curl.ml +++ b/curl.ml @@ -470,7 +470,7 @@ type curlOption = | CURLOPT_SEEKFUNCTION of (int64 -> curlSeek -> curlSeekResult) | CURLOPT_AUTOREFERER of bool | CURLOPT_OPENSOCKETFUNCTION of (Unix.file_descr -> unit) - | CURLOPT_CLOSESOCKETFUNCTION of (Unix.file_descr -> unit) +(* | CURLOPT_CLOSESOCKETFUNCTION of (Unix.file_descr -> unit) *) | CURLOPT_PROXYTYPE of curlProxyType | CURLOPT_PROTOCOLS of curlProto list | CURLOPT_REDIR_PROTOCOLS of curlProto list @@ -1019,8 +1019,10 @@ let set_autoreferer conn b = let set_opensocketfunction conn closure = setopt conn (CURLOPT_OPENSOCKETFUNCTION closure) +(* let set_closesocketfunction conn closure = setopt conn (CURLOPT_CLOSESOCKETFUNCTION closure) +*) let set_proxytype conn ptype = setopt conn (CURLOPT_PROXYTYPE ptype) @@ -1427,7 +1429,7 @@ class handle = method set_dns_servers l = set_dns_servers conn l method set_autoreferer b = set_autoreferer conn b method set_opensocketfunction closure = set_opensocketfunction conn closure - method set_closesocketfunction closure = set_closesocketfunction conn closure +(* method set_closesocketfunction closure = set_closesocketfunction conn closure *) method set_proxytype t = set_proxytype conn t method set_mimepost p = set_mimepost conn p method set_sshknownhosts s = set_sshknownhosts conn s diff --git a/curl.mli b/curl.mli index 89b4a5b..2930e48 100644 --- a/curl.mli +++ b/curl.mli @@ -478,7 +478,7 @@ type curlOption = | CURLOPT_SEEKFUNCTION of (int64 -> curlSeek -> curlSeekResult) | CURLOPT_AUTOREFERER of bool | CURLOPT_OPENSOCKETFUNCTION of (Unix.file_descr -> unit) - | CURLOPT_CLOSESOCKETFUNCTION of (Unix.file_descr -> unit) +(* | CURLOPT_CLOSESOCKETFUNCTION of (Unix.file_descr -> unit) *) | CURLOPT_PROXYTYPE of curlProxyType | CURLOPT_PROTOCOLS of curlProto list | CURLOPT_REDIR_PROTOCOLS of curlProto list @@ -790,7 +790,11 @@ val set_proxytransfermode : t -> bool -> unit val set_seekfunction : t -> (int64 -> curlSeek -> curlSeekResult) -> unit val set_autoreferer : t -> bool -> unit val set_opensocketfunction : t -> (Unix.file_descr -> unit) -> unit + +(** current implementation is faulty + ref https://github.com/ygrek/ocurl/issues/58 val set_closesocketfunction : t -> (Unix.file_descr -> unit) -> unit +*) val set_proxytype : t -> curlProxyType -> unit val set_protocols : t -> curlProto list -> unit val set_redirprotocols : t -> curlProto list -> unit @@ -867,7 +871,7 @@ val get_localport : t -> int val get_conditionunmet : t -> bool (** @since 0.6.1 (libcurl 7.19.4) *) val get_certinfo : t -> string list list -(** @since 0.9.3 *) +(** @since 0.9.2 *) val get_http_version : t -> curlHTTPVersion (** {2 Object interface} *) @@ -1013,7 +1017,7 @@ class handle : method set_seekfunction : (int64 -> curlSeek -> curlSeekResult) -> unit method set_autoreferer : bool -> unit method set_opensocketfunction : (Unix.file_descr -> unit) -> unit - method set_closesocketfunction : (Unix.file_descr -> unit) -> unit +(* method set_closesocketfunction : (Unix.file_descr -> unit) -> unit *) method set_proxytype : curlProxyType -> unit method set_resolve : (string * int * string) list -> (string * int) list -> unit method set_dns_servers : string list -> unit