SO_REUSEADDR
SO_REUSEADDR lets a socket bind to an address stuck in TIME_WAIT, letting a restarted server reclaim its port immediately.
Purpose
It avoids "Address already in use" on server restart by allowing immediate rebinding of a just-closed port.
Mechanism
Once set, bind() accepts local addresses whose connections are still in TIME_WAIT. TIME_WAIT lasts 2MSL (roughly 60-120 s), which you would otherwise have to wait out. Note the distinction from SO_REUSEPORT.
Use cases
- Fast server restarts
- Port reuse
- Development and debugging
Related tools
HTTP Status Codes
Reference table of common HTTP status codes (1xx-5xx) with names, categories, and descriptions. Free, private, and 100% client-side. TOOL
URL Parser
Parse a URL into its components: protocol, host, path, query, hash, port, username, and password. Free, private, and 100% client-side. TOOL