[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-devel] [bug #24830] Socket never closed sometimes.
From: |
Pettinato, Jim |
Subject: |
RE: [lwip-devel] [bug #24830] Socket never closed sometimes. |
Date: |
Tue, 31 Mar 2009 11:23:51 -0400 |
Couldn't the netconn just call tcp_abort in this case?
__
James M. Pettinato, Jr.
Software Engineer
E: address@hidden | P: 814 898 5250
FMC Technologies Measurement Solutions Inc.
1602 Wagner Avenue | Erie PA | 16510 USA
Phone: 814 898 5000 | Fax: 814 899-3414
www.fmctechnologies.com
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf
Of Kieran Mansley
Sent: Tuesday, March 31, 2009 11:03 AM
To: Kieran Mansley; Homyak; address@hidden
Subject: [lwip-devel] [bug #24830] Socket never closed sometimes.
Follow-up Comment #5, bug #24830 (project lwip):
Now I come to think about how to fix this, there is a minor problem:
data can be buffered on RX at lots of levels in the stack (within the
TCP layer, netconn layer, and sockets layer). Therefore tcp_close()
needs to know if there are any bytes buffered in the higher layers, but
it would be hard for it to work this out. I therefore think adding a
parameter that gets filtered down through the layers that says "there is
buffered data in the layer(s) above", and then passed to
netconn_delete() and tcp_close() would be a good idea. However, this
changes the API and so causes problems that way.
It would be fairly simple to alias the existing API functions to the new
ones, eg:
#define tcp_close(pcb) tcp_close_new(pcb, 0) #define
netconn_delete(conn) -> netconn_delete_new(conn, 0) (I would choose
better names than *_new() - any suggestions?)
This would result in minimal extra code, and keeps the API backwardly
compatible, but is a bit ugly in the long term.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?24830>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
_______________________________________________
lwip-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-devel