I use the RAW API. If I send out the 8K data inside the recv function,
everything is fine. But if I do the send later in the main(), I get some
strange problem. (long delay and TCP data corruption)
accept.
/* Configure LwIP to use our call back functions. */
tcp_err(pcb, tcpserver_conn_err);
tcp_recv(pcb, tcpserver_recv);
tcp_poll(pcb, tcpserver_poll, 10);
Inside the
tcpserver_recv:
{
receive packet.
tcp_write ( 10K bytes);
}
No problem.
If I modify the program to asynchronous send. it will mess up the data.
(data slow, BAD TCP CRC, basically screw the MAC chip and needs a reset)
tcpserver_recv:
{
receive packet.
rememember pcb.
}
main
{
while(1)
{
If(have_data)
tcp_write(saved_pcb, data(10KB));
}
}
What do I have to do different for asynchronous send?
receive signal.
send out data later instead of inside the RECV function.
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users