類別階層

No English version again. Should I just remove English version from my bog?

APUE 2nd Ed.

APUE 2nd Ed. comes out! Revised by Stephen A. Rago.

http://books.slashdot.org/books/05/07/09/2258248.shtml?tid=156&tid=130&tid=6

忘了一件事

On my 20th birthday, I made my mind to buy me a book as a present in my every birthdays, something different to my field. I was busy at that time on this birthday, so I haven’t bought it until now. Hmm… I need to find a book quickly.

I like to find a novel, a novel which depict someone normal.

TIME_WAIT state

When I wrote my Computer Network’s homework, I found that binding to the same port will be failed after a client comes in and stop the httpd. I see TIME_WAIT state when execute netstat.

One should wait in TIME_WAIT state for 2 x MSL (/maximum segment lifetime/) after close one connection. The suggestion time interval in RFC 1122 is 120 seconds. But the implementation of Linux follows BSD, which set MSL to 30 seconds. There’s a comment in net/ipv4/tcp_minisocks.c:

* [ BTW Linux. following BSD, violates this requirement waiting
*   only for 60sec, we should wait at least for 240 secs.
*   Well, 240 consumes too much of resources 8)
* ]

I observed the time, and it really about 1 minute Q_Q So I should add a port to the argument :/

BTW, Unix Network Programming is really a great book!

Update:
Use setsockopt to enable SO_REUSEADDR will solve this problem.