[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #10088] Correctly implement close() vs. shutdown()
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [task #10088] Correctly implement close() vs. shutdown() |
Date: |
Sat, 20 Feb 2010 12:12:12 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2) Gecko/20100115 Firefox/3.6 |
Follow-up Comment #11, task #10088 (project lwip):
> I agree that, for native API apps, close is completely
> equivalent to shutdown(SHUT_RDWR). In a standard BSD sockets
> implementation, the two should be equivalent with respect to the
> protocol stack; the only significant difference is that close
> also deallocates the socket file descriptor.
The actual change to implement shutdown is rather simple (implemented with a
flag). However, there might be a problem for raw API apps to know when the PCB
is actually deallocated (and may not be referenced by the application any
more). We can implement this is in 2 ways:
a) Keep the current behaviour. This means that after successfully calling
tcp_shutdown(RDWR), the applicaiton may not reference the PCB any more and it
will be deallocated eventually (no more callbacks are made!).
b) Change the behaviour to *not* automatically deallocate the PCB unless
tcp_close() is called.
Solution a) has the disadvantage that when tcp_shutdown(WR) puts the PCB into
FIN_WAIT_1 or LAST_ACK, in which it will be closed eventually. This might not
be a problem for applications, but it violates TCP behaviour in that the
connection is closed too early (if it is idle).
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?10088>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Simon Goldschmidt, 2010/02/15
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Simon Goldschmidt, 2010/02/15
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Jeff Barber, 2010/02/16
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Kieran Mansley, 2010/02/16
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Simon Goldschmidt, 2010/02/16
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Kieran Mansley, 2010/02/16
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Simon Goldschmidt, 2010/02/16
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Kieran Mansley, 2010/02/16
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Simon Goldschmidt, 2010/02/16
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Kieran Mansley, 2010/02/16
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(),
Simon Goldschmidt <=
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Simon Goldschmidt, 2010/02/20
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Simon Goldschmidt, 2010/02/20
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Kieran Mansley, 2010/02/22
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Simon Goldschmidt, 2010/02/22
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Kieran Mansley, 2010/02/22
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Simon Goldschmidt, 2010/02/22
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Jeff Barber, 2010/02/22
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Kieran Mansley, 2010/02/22
- [lwip-devel] [task #10088] Correctly implement close() vs. shutdown(), Jeff Barber, 2010/02/22