[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] netconn_close()
From: |
Jonathan Larmour |
Subject: |
Re: [lwip-users] netconn_close() |
Date: |
Tue, 27 May 2008 20:30:44 +0100 |
User-agent: |
Thunderbird 1.5.0.12 (X11/20070530) |
Marko Panger wrote:
> Jonathan,
>
> First of all - thanks !
>
> How could I prevent from waiting forever ? I imagine by setting the
> conn->recv_timeout. Is there
> a api call for this or can I access it directly just before calling
> netconn_recv() ?
Unfortunately there isn't a proper API for accessing the receive timeout,
so for now you can just access the structure member directly in the
netconn, e.g.:
/* Call it a timeout if there is nothing in 60 seconds */
conn->recv_timeout = 60*1000;
buf = netconn_recv(conn);
if (!buf) {
/* It timed out */
...
}
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.
------["Si fractum non sit, noli id reficere"]------ Opinions==mine