lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #10088] Correctly implement close() vs. shutdown()


From: Jeff Barber
Subject: [lwip-devel] [task #10088] Correctly implement close() vs. shutdown()
Date: Tue, 16 Feb 2010 15:17:50 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 GTB6

Follow-up Comment #3, 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.

Not really sure about how SHUT_RD should work but as far as I can tell,
neither is anyone else.  :-)  I don't think it matters; the consensus seems to
be that SHUT_RD alone is ill-defined and really doesn't make a lot of sense.

If I understand your last point, you're referring to the API change (current
caller of tcp_close would require code change to tcp_shutdown(WR) because
tcp_close gets different behavior)?  If so, I agree that it's a major change
but also think that it's the right thing to do.  It would certainly deserve a
big fat note in the 1.4 readme.


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?10088>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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