[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] tcp_close and the unsent queue
From: |
Tom Hennen |
Subject: |
[lwip-users] tcp_close and the unsent queue |
Date: |
Tue, 10 Oct 2006 12:53:12 -0400 |
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] tcp_close and the unsent queue,
Tom Hennen <=