thanks a lot for your help 
It works now . 
Indeed , I did a mistake with the tcp_pcb given by the accept callback . I
thought it was the same object that in the main loop but simply no . And now
, I better understand the logic behind the stack :).
thanks again !!



Kieran Mansley wrote:
> 
> 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
> 
> 
> 
> _______________________________________________
> lwip-users mailing list
> [email protected]
> http://lists.nongnu.org/mailman/listinfo/lwip-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/tcp_write%28%29-problem-from-outside-callbacks-functions-tf3530647.html#a9859824
Sent from the lwip-users mailing list archive at Nabble.com.



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to