[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Netconn API_ client TCP
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] Netconn API_ client TCP |
Date: |
Wed, 28 Apr 2010 10:42:11 +0200 |
Nicolas Dioli wrote:
> Hello,
> i have a problem of mbox during initialisation of Netconn API. I had
> seen an exemple of TCP server but i hadn't seen a TCP client:
> http://cvs.savannah.gnu.org/viewvc/contrib/apps/tcpecho/tcpecho.c?revision=1.2&root=lwip&view=markup
>
>
> So, i wonder if i forgot something (init, bind , ...) ?
>
> There is my code:
>
> pppInit();
> mem_init();
> tcpip_init(noop, NULL); //lwip init() +
> create tcpip thread;
The problem is here: you don't wait for tcpip_init to be finished. Wait for the
init-done callback to be called (e.g. by using a mutex).
> pd=pppOpen(io, noop, NULL); //create pppmain
> thread
That's not very thread-safe too, but I guess that's not your problem currently?
Simon
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01