cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: reply to all: CURLE_OPERATION_TIMEDOUT when FTP upload withlarge files

From: A-ZYSTEMS <info_at_azystems.de>
Date: Thu, 4 Jun 2009 11:55:39 +0200

 

> And you're top-posting. Please don't:
> http://curl.haxx.se/mail/etiquette.html#top-post

Sorry, that is my firt time in using a mailing list

> No. Please read the docs for the CURLOPT_SOCKOPTFUNCTION option.

I have read the tutorial and found the reason for SO_KEEPALIVE option
(denial-of-service attack)

I must create a sockopt_Callback with

curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);

And here the callback function:

size_t CThreadUpload::sockopt_callback(void *clientp, curl_socket_t curlfd,
curlsocktype purpose)
{
   return 0;
}

But how can I set the SO_KEEPALIVE option in the callback.

I found no example or description in the docs and google.

Thx

Alexander
Received on 2009-06-04