[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Function set by tcp_recv() not getting called
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] Function set by tcp_recv() not getting called |
Date: |
Mon, 08 Mar 2010 08:12:49 +0100 |
JM wrote:
> [..]
> pcb_web = tcp_new();
> tcp_bind(pcb_web, IP_ADDR_ANY, 80);
> pcb_web = tcp_listen(pcb_web);
> tcp_accept(pcb_web, http_accept);
> tcp_recv(pcb_web, http_recv);
> [..]
> Everytime I send data to lwIP, I see a similar output, but http_recv still
> doesn't get called. What could I be doing wrong?
That depends on the rest of the server. E.g., what does http_accept do? Does it
get called at all? Does it set the recv callback on the connection pcb?
Oh, and setting the recv callback to the listening pcb is wrong. It might even
lead to accessing invalid memory, maybe that's your problem? You should try to
move the tcp_recv call into http_accept.
Simon
--
GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
http://portal.gmx.net/de/go/dsl02