On Sat, 7 Aug 2010, Georg Lippitsch wrote:

why do curl_easy_send and curl_easy_recv only work if CURLOPT_CONNECT_ONLY is set?

Primarily because those functions were designed for that purpose and that's what we've tested them for. Since we haven't made it supported in any other situation, functionality beyond that is not guaranteed - so even if you may find that something works now it may not in the next release.

Both those commands are also very powerful and can very easily be used in ways that severly confuse or mess up the internal FTP "engine" and its state machine(s).

In my special case, I want to use the ftp control connection to send/receive custom data while a large file is uploaded.

That isn't very reliable. It has proven that a lot of FTP servers don't read or respond to commands while the transfer is in progress. That also explains another reason we limit these functions: we do our very best to make libcurl work and work reliably with all servers.

But I think, there might also be other uses for curl_easy_send without CURLOPT_CONNECT_ONLY, for example to send custom data to an open connection after a file was downloaded.

That's what we have the CURLOPT_*QUOTE options for.

Are there any objections using curl_easy_send the way I did?

Yes, as explained.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to