Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UDPListener ¶
type UDPListener struct {
// contains filtered or unexported fields
}
UDPListener handles reading packets from the underlying UDP connection.
func ListenUDP ¶
func ListenUDP(addr string) (*UDPListener, error)
ListenUDP sets up a UDP server that receives packets containing events.
func (*UDPListener) Close ¶
func (u *UDPListener) Close() error
func (*UDPListener) LocalAddr ¶
func (u *UDPListener) LocalAddr() net.Addr
func (*UDPListener) Next ¶
func (u *UDPListener) Next() (payload []byte, source *net.UDPAddr, err error)
Next returns the next packet from UDP and it's associated source address. Should an error occur, then it is returned. A source address may be returned alongside an error for further reporting in the event of abuse/debugging.
Click to show internal directories.
Click to hide internal directories.