[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] tcp_write() problem from outside callbacks functions
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] tcp_write() problem from outside callbacks functions |
Date: |
Thu, 05 Apr 2007 15:16:50 +0100 |
On Thu, 2007-04-05 at 07:01 -0700, Yann Suisini wrote:
> All is passed by reference with the
> same tcp_pcb (tcpweb).
No it's not - in the send/recv/poll callbacks you're using the supplied
tpcb argument which is set to newpcb when you initialise them in your
accept callback, whereas in the main loop you're using the tcpweb pcb.
You've set the tcpweb pcb up to be a listening one (i.e. you assign it
the output of tcp_listen()). In your accept callback you are given a
"newpcb". You should use this to send data in your main loop (as you do
correctly in your send/recv/poll callbacks), not the one given by
tcp_listen().
Kieran