neterror
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package neterror classifies network errors.
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
funcPacketWasTruncated¶
PacketWasTruncated reports whether err indicates truncation but the RecvFromthat generated err was otherwise successful. On Windows, Go's UDP RecvFromcalls WSARecvFrom which returns the WSAEMSGSIZE error code when the receiveddatagram is larger than the provided buffer. When that happens, both a validsize and an error are returned (as per the partial fix for golang/go#14074).If the WSAEMSGSIZE error is returned, then we ignore the error to getsemantics similar to the POSIX operating systems. One caveat is that itappears that the source address is not returned when WSAEMSGSIZE occurs, butwe do not currently look at the source address.
funcShouldDisableUDPGSO¶added inv1.40.0
funcTreatAsLostUDP¶
TreatAsLostUDP reports whether err is an error from a UDP sendoperation that should be treated as a UDP packet that just gotlost.
Notably, on Linux this reports true for EPERM errors (from outboundfirewall blocks) which aren't really send errors; they're justsends that are never going to make it because the local OS blockedit.
Types¶
typeErrUDPGSODisabled¶added inv1.40.0
func (ErrUDPGSODisabled)Error¶added inv1.40.0
func (eErrUDPGSODisabled) Error()string
func (ErrUDPGSODisabled)Unwrap¶added inv1.40.0
func (eErrUDPGSODisabled) Unwrap()error