Documentation ¶
Overview ¶
Package net provides a net.Conn implementation for UDP packets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithUDPConnBufferedWrite ¶
func WithUDPConnBufferedWrite(buffered bool) func(*UDPConnOptions)
WithUDPConnBufferedWrite change the behaviour of UDPConn to buffer or not all write calls until Flush is called. By default it will buffer all write calls.
Types ¶
type UDPConn ¶
type UDPConn struct { net.PacketConn // contains filtered or unexported fields }
UDPConn is a net.Conn implementation for UDP packets. It will buffer all write calls and write them to the connection when Flush is called.
func NewUDPConn ¶
func NewUDPConn(conn net.PacketConn, optFuncs ...func(*UDPConnOptions)) *UDPConn
NewUDPConn creates a new UDPConn.
func (*UDPConn) RemoteAddr ¶
RemoteAddr returns the remote network address, if known.
type UDPConnOptions ¶
type UDPConnOptions struct {
// contains filtered or unexported fields
}
UDPConnOptions are options for UDPConn.
Click to show internal directories.
Click to hide internal directories.