lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] RE: Why the tcp_pcb haven't been free when I calltcp_close(


From: geckook Xu
Subject: [lwip-users] RE: Why the tcp_pcb haven't been free when I calltcp_close()
Date: Thu, 15 Mar 2007 23:13:00 +0800

When I call tcp_close(),the program will send FIN,and then the
receiver will reply FIN
But the tcp_pcb haven't been free after this operation.

What should I do now?

It is my source code below in the attach file.


> I use the lwip raw api.
>
>
> When I call tcp_close() the tcp state is ESTABLISH.
> and tcp_close() return err=ERR_OK.
>
> when will the tcp_pcb be free?

I don't really know the lwip raw api regarding TCP. But what I know is
that on socket-based systems, a TCP connection is only closed from one
side if you call close(). It remains in a closing state until the other
side has closed the connection, too.

Without looking in the code, I would say this is the same for lwip raw
api, too. I don't know if there is a function which aborts the
connection without waiting for the other side to close it, too.

Simon

Attachment: app_server.c
Description: Text document


reply via email to

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