Documentation
¶
Overview ¶
Package safeconn provides nil-safe accessors for net.Conn properties.
These functions exist because gvisor-based network stacks can cause the connection's addresses to disappear very quickly after a connection is closed, leading to segfaults when accessing LocalAddr or RemoteAddr. By centralizing nil checks here, we defend against this platform-specific behavior.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoteAddr ¶
RemoteAddr returns the conn remote address or the empty string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.