lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] tcp_write() problem from outside callbacks functions


From: Yann Suisini
Subject: Re: [lwip-users] tcp_write() problem from outside callbacks functions
Date: Thu, 5 Apr 2007 10:42:51 -0700 (PDT)

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
> address@hidden
> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]