[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] tcp_tmr and timers.c
From: |
Matthias Dübon |
Subject: |
Re: [lwip-users] tcp_tmr and timers.c |
Date: |
Mon, 27 Oct 2014 13:43:20 +0100 |
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 <address@hidden> 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
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users
ᐧ