cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: PORT mode & progress updates

From: George Comninos <george_at_macromedia.com>
Date: Mon, 12 May 2003 03:07:24 -0700

Hi Daniel, thanks for the response..

>> But we never get that because it looks like the data socket is using
>> blocking mode.
>
> Why? libcurl is designed to work with non-blocking sockets and you'll make it
> work a lot more how you'd want it using non-blocking ones. The support for
> using blocking sockets is mainly if you're stuck in an operating system from
> 30 years ago and can't be made to upgrade...

I didn't actually want blocking sockets nor did I set the socket to
blocking, I just noticed that it appears to be blocking...I would have
assumed curl would be setting it to non-blocking but I put a breakpoint on
the ioctl call in Curl_nonblock and it only gets hit once and it's not the
same socket as the data socket when doing the transfer. I also never get
EWOULDBLOCK back. Do I have to set it to non-blocking myself at some point
or perhaps there's a flag for controlling that...I don't see one though?

>> Is there something I'm missing? perhaps some build flag or curl option I'm
>> not setting properly? I'm currently setting a progress callback with
>> CURLOPT_PROGRESSFUNCTION and have set CURLOPT_NOPROGRESS to FALSE.
>>
>> I've also tried grabbing the latest source (7.10.4) and built the command
>> line curl app as is and I get the same behavior -- I only see progress
>> update when the transfer is completed if I'm using -P mode.
>
> I think it looks like a problem I thought I fixed in 7.10.4.
>
> Can you make sure that 'writedone = TRUE' is made ALWAYS after Curl_write()
> has been called, and let me know if that fixes your problem?

I'm pretty sure that will fix the problem...I'll make sure tomorrow though.

thanks a bunch!,
-george

-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
Received on 2003-05-12