Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 21s8 days 9 hours 54 minutes 21 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 21s8 days 9 hours 54 minutes 21 seconds.

Sign in to watch this lesson
TCP · 3:46
How TCP creates and destroys the shared state behind a connection. Following K&R, we trace the three-way handshake with random initial sequence numbers, see how SYN floods exhaust a server and how SYN cookies defend it without storing anything, and walk the four-segment teardown into TIME_WAIT. On this Mac's loopback, netstat shows FIN_WAIT_2, CLOSE_WAIT and a TIME_WAIT that lasts about 30 seconds, a closed port answers with a reset in microseconds, and a fresh connection per message costs over three times a message on an open one, which is why trading firms keep order sessions open all day.