lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Difficulting ending a connection over lwip raw-api


From: Larry Rachman [Innovation Design and Solutions, Inc.]
Subject: [lwip-users] Difficulting ending a connection over lwip raw-api
Date: Mon, 8 Aug 2005 10:20:14 -0700 (PDT)
User-agent: SquirrelMail/1.4.1

Almost certainly this is due to something I'm doing wrong, but after
reading through both the documentation and list archives, I still can't
seem to dope it out.

I establish a connection via the raw api, and move some data. When its
time to end the connection, I send an appropriate message with
tcp_write(), and in that message's 'sent' callback, I call tcp_close(),
repeating as necessary until it returns ERR_OK. Then I call a function of
my own, which does an init_pcb() and a tcp_bind() so I'm listening on the
port for the next inbound connection.

The problem is that when I do the pcb_bind() I get ERR_USE, no matter how
long I wait or how many times I retry.

Obviously, there's something I'm forgetting to do to fully disassociate
the last connection from the port. According to the documentation, the
call to tcp_close() deallocates the controlling pcb, so I'm not sure how I
*could* do anything at that point. If anyone can offer a suggestion, I'd
really appreciate it.

Thanks in advance,

Larry Rachman
_____________________________________
Larry Rachman
Innovation Design and Solutions, Inc.
1044 Washington Drive
Centerport, NY 11721
631-427-1112 (NY)
508-967-2511 (MA)
631-427-0656 (fax)
www.4innovation.biz
_____________________________________







reply via email to

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