cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: TFTP and the Multi Interface

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 30 Dec 2008 15:45:50 -0800

On Tue, Dec 30, 2008 at 11:31:24PM +0100, Daniel Stenberg wrote:
> On Tue, 30 Dec 2008, Chad Monroe wrote:
>> Now that you point it out, I see it in the docs :). I'll take a look at
>> it, but if you have any pointers regarding implementation before I dive
>> in it'd be much appreciated.
>
> Well, first you need to start thinking in a non-blocking way, and the
> entire transfer process that needs to be written to never rely on anything
> to happen in a blocking manner. This typically results in getting the
> transfer stuff done by some kind of state machine so that repeated calls
> can continue where it was left off before. The lib/ssh.c and lib/ftp.c are
> examples of that practise.

Luckily, the tftp code is already based on a state machine. I suspect it's
going to be almost trivial to get tftp working nonblocking.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-12-31