Ray, Perhaps you can show us your connection setup code (i.e. the tcp alloc, listen, bind, etc.).
Bill -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Numb_Faith Sent: Friday, August 09, 2013 3:46 AM To: [email protected] 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 [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
