Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TCP ¶
TCP wraps net.Listen("tcp", addr) with a retry budget around bind failures. After Listener.Close() returns, the kernel can still hold the bind for hundreds of milliseconds while accepted connections drain. Most visible on Windows during SIGHUP-driven runtime restart cycles, where the new runtime's net.Listen races the old listener's teardown of its accepted connections.
The platform-specific control hook (see listen_*.go) sets SO_REUSEADDR-equivalent options where they help, and the retry covers any remaining transient failure window. Real conflicts (port held by a different process for the whole budget) still surface.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.