lwip-users
[Top][All Lists]
Advanced

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

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


From: Numb_Faith
Subject: [lwip-users] tcp_output() when processing "tcp_input_pcb"
Date: Fri, 9 Aug 2013 00:45:59 -0700 (PDT)

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-tp21783.html
Sent from the lwip-users mailing list archive at Nabble.com.



reply via email to

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