Re: [lwip-users] tcp_tmr and timers.c

2014-10-27 Thread Sergio R. Caprile
All I can tell you, and I don't know if it suffices, is that you call
sys_check_timeouts();
in your main loop and all timing is done.
Check your lwipopts.h for the number of timers if using dhcp, dns, etc.
Should you need to use a timer for your own purposes:

static void myfunction(something *myarg);

sys_timeout(SEND_TIME, (sys_timeout_handler) myfunction, myarg);
// callback gets called back on timeout;
sys_untimeout((sys_timeout_handler) myfunction, myarg);   
// timer removed



___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] tcp_tmr and timers.c

2014-10-27 Thread Matthias Dübon
Hi Sergio,

calling sys_check_timeouts in the main loop does not suffice, cause
the tcp_tmr is not activated in the timers.c module. For me the
natural solution would be to add tcp_tmr activation to timers.c and
then call sys_check_timeouts in my main loop. But I am not sure if
there's a reasion why tcp_tmr is not integrated in timers.c.

best
Matthias



On Mon, Oct 27, 2014 at 1:37 PM, Sergio R. Caprile  wrote:
> All I can tell you, and I don't know if it suffices, is that you call
> sys_check_timeouts();
> in your main loop and all timing is done.
> Check your lwipopts.h for the number of timers if using dhcp, dns, etc.
> Should you need to use a timer for your own purposes:
>
> static void myfunction(something *myarg);
>
> sys_timeout(SEND_TIME, (sys_timeout_handler) myfunction, myarg);
> // callback gets called back on timeout;
> sys_untimeout((sys_timeout_handler) myfunction, myarg);
> // timer removed
>
>
>
> ___
> lwip-users mailing list
> lwip-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/lwip-users

ᐧ

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] tcp_tmr and timers.c

2014-10-27 Thread Sergio R. Caprile
All my TCP examples and applications work, and I'm calling
sys_check_timeouts(); so, if tcp_tmr is really not called, then
"something" with the same functionality is being called.
I do use NO_SYS=1 and have provided a working sys_now() function.
DHCP and DNS timeouts are also handled through sys_check_timeouts(), and
I have used a timeout for a UDP application as I sent.
As this seems to work for any similar scenario,  what is actually your
problem ?



___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] tcp_tmr and timers.c

2014-10-28 Thread goldsi...@gmx.de

Matthias Dübon wrote:

calling sys_check_timeouts in the main loop does not suffice, cause
the tcp_tmr is not activated in the timers.c module.


Matthias, there would be something seriously wrong with your code if 
calling sys_check_timeouts wouldn't suffice.


I wonder how what are you actually complaining about? Does anything not 
work as expected? Have a look at timers.c lines 72-111. The TCP timer is 
only active when needed (i.e. not active when no connections need a 
timeout).



Simon

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] tcp_tmr and timers.c

2014-10-29 Thread Matthias Dübon
Hello,

yes you are right, the call to sys_check_timeouts is enough. My
problem was that my connection has closed when my problem occurred. So
thanks, the timers.c is fine and suits all my needs. Thanks for your
support.

best
Matthias



On Tue, Oct 28, 2014 at 1:59 PM, goldsi...@gmx.de  wrote:
> Matthias Dübon wrote:
>>
>> calling sys_check_timeouts in the main loop does not suffice, cause
>> the tcp_tmr is not activated in the timers.c module.
>
>
> Matthias, there would be something seriously wrong with your code if calling
> sys_check_timeouts wouldn't suffice.
>
> I wonder how what are you actually complaining about? Does anything not work
> as expected? Have a look at timers.c lines 72-111. The TCP timer is only
> active when needed (i.e. not active when no connections need a timeout).
>
>
> Simon
>
>
> ___
> lwip-users mailing list
> lwip-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/lwip-users
ᐧ

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users