So as I understand it the 'correct' way to use tcp_close is to wait
for pcb->unacked and pcb->unsent to both equal NULL.  Only then should
tcp_close be called.

Can someone explain why this is?  I'm finding it to be cumbersome.

If I ignore this best practice and just call tcp_close when I receive
a close request from another host then any packets left on the unsent
queue end up 'leaking'.

Is there any particular reason tcp_close doesn't free the unsent queue
when closing the connection?

Is there any other side-effect to calling tcp_close before unacked and
unsent are NULL?

Thanks,

Tom


_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to