Add new post, fix subtitle in socket post.
This commit is contained in:
parent
e6d07f70fb
commit
cb007fb918
|
@ -11,6 +11,6 @@ I have a new [guest post] up over at Eruditorum Press. It's about Anarchy, trans
|
|||
|
||||
This is my fourth entry for the [SNES Project], and this one is on [Final Fantasy III], or VI, or whatever you want to call it. You know, the one with chocobos.
|
||||
|
||||
[guest post]: http://put_url_here
|
||||
[guest post]: http://www.eruditorumpress.com/blog/when-you-were-young-and-you-wanted-to-set-the-world-on-fire-final-fantasy-iii/
|
||||
[SNES Project]: http://www.eruditorumpress.com/blog/tag/super-nintendo-project/
|
||||
[Final Fantasy III]: https://en.wikipedia.org/wiki/Final_Fantasy_VI
|
|
@ -49,3 +49,8 @@ Otherwise you end up with sockets hanging out forever in CLOSE_WAIT.
|
|||
In other words, if a socket is stuck in CLOSE_WAIT, it is necessarily a fault in the application - the application is failing to check for the connection closing, and thus never calls `close()`.
|
||||
|
||||
This problem is common in applications that do nothing but `write()` to their sockets (they never `read()` so they never detect the EOF). To prevent this problem, any program that opens a socket must occasionally try to `read()` from the socket to make sure it isn't writing data into a closed connection. If blocking on read is a problem, you can open the socket with the O_NONBLOCK flag.
|
||||
|
||||
|
||||
<small>
|
||||
<sup>1</sup>Many languages and libraries abstract these calls and make opening sockets much, much easier. On any Unix-like system, though, they all make these calls eventually, since they are kernel syscalls.
|
||||
</small>
|
||||
|
|
Loading…
Reference in New Issue
Block a user