cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: working on a new API

From: Steve Dekorte <steve_at_dekorte.com>
Date: Sat, 27 Oct 2001 14:02:08 -0700

Ben Greear wrote:
> If you use NON-Blocking IO it doesn't really matter because you will
> never block on the socket. Of course, you have to buffer non-written
> bytes in memory so you have to be careful about that...

Right, you won't block, but you can bring your system to a virtual
standstill via paging if you try to put more data into a socket
buffer(or program memory) than you have available memory. (assuming your
disk is much faster than your connection speed to the receiver) Also,
even if the socket operation isn't blocking, the file operation is. So
if your curl_handle is pulling data off a drive, it will block for as
long as that operation takes(which can be a long time for a large file).

Steve
Received on 2001-10-27