Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!bu.edu!purdue!mentor.cc.purdue.edu!dls From: dls@mentor.cc.purdue.edu (David L Stevens) Newsgroups: comp.protocols.tcp-ip Subject: Re: freeing socket on TCP close request Keywords: TCPclose Message-ID: <7879@mentor.cc.purdue.edu> Date: 26 Feb 90 17:25:52 GMT References: <482@phcoms.seri.philips.nl> Reply-To: dls@mentor.cc.purdue.edu (David L Stevens) Organization: PUCC UNIX Group Lines: 10 You can use a shutdown(2), but beware! Shutdown(2) (both ways, anyway) is equivalent to TCP's ABORT() user request. In particular, if any data is buffered in the kernel locally waiting to be sent, it will be dropped and the other side will never see it. Some protocols have (essentially) extraneous acknowledgements at the application level, so you really can tell when you've gotten all the data, and then shutdown(2)'s ok. In most cases, you really want a close(2). -- +-DLS (dls@mentor.cc.purdue.edu)