lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Implementing Ftp File Transfert : Non blocking Send ?


From: Jonathan Larmour
Subject: Re: [lwip-users] Implementing Ftp File Transfert : Non blocking Send ?
Date: Sat, 03 Jan 2009 15:32:39 +0000
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc3.4.legacy (X11/20060515)

Paul THILLOY wrote:

if the transfert is interrupted by some disconnection...then it is impossible to leave the send or write function...Am I doing something wrong ?

I remember people before saying the timeouts are just very very long, something like a few hours IIRC. However looking at the code, I can't find any code that will terminate a connection unless you use the SO_KEEPALIVE socket option. For my own interest, I'd be grateful if someone could tell me where this is done when keepalives are off.

Nevertheless you can use that option with setsockopt(). You can also change the keepalive timeouts by enabling LWIP_TCP_KEEPALIVE in lwipopts.h, and then using either TCP_KEEPALIVE or TCP_KEEPIDLE, possibly also with TCP_KEEPINTVL and TCP_KEEPCNT options. Look at include/lwip/sockets.h, and note that include/lwip/tcp.h has the defaults and note what it says about RFC 1122.

Jifl
--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

[Prev in Thread] Current Thread [Next in Thread]