Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Berkeley sockets
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Terminating sockets== The operating system does not release the resources allocated to a socket until the socket is closed. This is especially important if the ''connect'' call fails and will be retried. When an application closes a socket, only the interface to the socket is destroyed. It is the kernel's responsibility to destroy the socket internally. Sometimes, a socket may enter a {{mono|TIME_WAIT}} state, on the server side, for up to 4 minutes.<ref>{{cite web|url=http://www.softlab.ntua.gr/facilities/documentation/unix/unix-socket-faq/unix-socket-faq-4.html#ss4.2 |title=terminating sockets |publisher=Softlab.ntua.gr |access-date=2012-07-26}}</ref> On [[SVR4]] systems, use of {{code|close()}} may discard data. The use of {{code|shutdown()}} or SO_LINGER may be required on these systems to guarantee delivery of all data.<ref>{{cite web|url=http://www.softlab.ntua.gr/facilities/documentation/unix/unix-socket-faq/unix-socket-faq-2.html#time_wait |title=ntua.gr - Programming UNIX Sockets in C - Frequently Asked Questions: Questions regarding both Clients and Servers (TCP/SOCK_STREAM) |publisher=Softlab.ntua.gr |access-date=2012-07-26}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)