nettype
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 nettype defines an interface that doesn't exist in the Go net package.
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeConnPacketConn¶added inv1.38.0
type ConnPacketConn interface {net.Connnet.PacketConn}ConnPacketConn is the interface that's a superset of net.Conn and net.PacketConn.
typePacketConn¶added inv1.30.0
type PacketConn interface {WriteToUDPAddrPort([]byte,netip.AddrPort) (int,error)ReadFromUDPAddrPort([]byte) (int,netip.AddrPort,error)io.CloserLocalAddr()net.AddrSetDeadline(time.Time)errorSetReadDeadline(time.Time)errorSetWriteDeadline(time.Time)error}PacketConn is like a net.PacketConn but uses the newer netip.AddrPortwrite/read methods.
typePacketListener¶
type PacketListener interface {ListenPacket(ctxcontext.Context, network, addressstring) (net.PacketConn,error)}PacketListener defines the ListenPacket method as implementedby net.ListenConfig, net.ListenPacket, and tstest/natlab.
typePacketListenerWithNetIP¶added inv1.30.0
type PacketListenerWithNetIP interface {ListenPacket(ctxcontext.Context, network, addressstring) (PacketConn,error)}funcMakePacketListenerWithNetIP¶added inv1.30.0
func MakePacketListenerWithNetIP(lnPacketListener)PacketListenerWithNetIP