[Top][All Lists]

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

Re: [lwip-users] http_sent cb shows 1 byte trailer [RAW]

From: Chris Strahm
Subject: Re: [lwip-users] http_sent cb shows 1 byte trailer [RAW]
Date: Mon, 10 Aug 2009 10:41:42 -0700

>> Maybe recursion?
>> Where is close_conn being called from here?

It comes from my send_data() routine.
Once all of the data to send has been written to tcp_write(),
then close_conn gets called, and send_data() returns.

I scratched my head for a while trying to understand
how this all worked.  tcp_write() is just sending the
data to the queue, it has not yet been delivered,
yet close_conn() gets called.

It made me uneasy thinking I was making a call to
close the connection while I knew data would
still be going through.  I assume that lwIP must treat
this call as a "post" and it knows data is still moving
so it actually does the close after it is done outputing
the data.  At least that's the conclusion I came to.

>> that would explain what you're seeing.

Well based on what the guys have now said, I guess it is all working, or at
least acting the way it is suppose to.


reply via email to

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