shutdownとかhalf-open-connectionの必要性
いわゆるhalf open connectionを使わないなら、shutdownは要らないんだろうか。
- 大概のUNIXはsocketをcloseすると普通のシーケンスでFINを交換する
- Winsockは謎。closeに相当するclosesocketは、特に明示されていなければ暗黙にshutdownすることになっている
Some amount of confusion arises, however, from the fact that the closesocket function implicitly causes a shutdown sequence to occur if it has not already happened. In fact, it has become a rather common programming practice to rely on this feature and to use closesocket to both initiate the shutdown sequence and deallocate the socket handle.
half open connectionを積極的に使うプロトコルはなかなか無いので、そういう意味ではshutdownも要らないのかもしれない。