Documentation
¶
Overview ¶
Package sockerr classifies socket errors portably. On Windows, Winsock reports WSAE* codes (WSAECONNREFUSED is 10061), while the syscall.E* constants there are invented values that never match a real socket error; errors.Is(err, syscall.ECONNREFUSED) is therefore always false on Windows. Every check here matches the POSIX errno and, on Windows, its Winsock code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAddrInUse ¶
IsAddrInUse reports a bind to an address already in use (EADDRINUSE).
func IsConnAborted ¶
IsConnAborted reports a connection aborted locally (ECONNABORTED).
func IsConnRefused ¶
IsConnRefused reports an explicit connection refusal (ECONNREFUSED).
func IsConnReset ¶
IsConnReset reports a connection reset by the peer (ECONNRESET).
func IsDescriptorExhausted ¶
IsDescriptorExhausted reports a process or system descriptor limit (EMFILE, ENFILE).
func IsUnreachable ¶
IsUnreachable reports a missing network or host route (ENETUNREACH, EHOSTUNREACH).
Types ¶
This section is empty.