lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] tcp_output() when processing "tcp_input_pcb"


From: Bill Auerbach
Subject: Re: [lwip-users] tcp_output() when processing "tcp_input_pcb"
Date: Fri, 9 Aug 2013 10:44:37 -0400

Ray,

Perhaps you can show us your connection setup code (i.e. the tcp alloc,
listen, bind, etc.).

Bill

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf
Of Numb_Faith
Sent: Friday, August 09, 2013 3:46 AM
To: address@hidden
Subject: [lwip-users] tcp_output() when processing "tcp_input_pcb"

When I use lwip1.4.1 and RAW API, I meet a problem. I use my borad(STM32) as
a server. When server receive a packet from client, I hope it can send a
packet immediately. So I call the function below:

/tcp_write(tpcb, DataTest, sizeof(DataTest), 0x01); tcp_output(tpcb);/

But when server receive a packet, the stack will call tcp_input(), and
tcp_input_pcb = pcb (the connection), so tcp_output(tpcb) would return.

When I comment the code below(in function tcp_output), it can got what I
want. But I'm still confused about why "If we are invoked by the TCP input
processing code, we do not output anything".

/* First, check if we are invoked by the TCP input processing code. If so,
we do not output anything. 
    Instead, we rely on the input processing code to call us when input
processing is done with. */ //  if (tcp_input_pcb == pcb) { //  return
ERR_OK; //  } 

Best Regards,
Ray Li



--
View this message in context:
http://lwip.100.n7.nabble.com/tcp-output-when-processing-tcp-input-pcb-tp217
83.html
Sent from the lwip-users mailing list archive at Nabble.com.

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

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