Documentation ¶
Overview ¶
udpconn implements Accept()-like semantics for a UDP listener
Index ¶
- type Conn
- type Listener
- func (ln *Listener) Accept() (*Conn, error)
- func (ln *Listener) BroadcastConn() *Conn
- func (ln *Listener) BroadcastSendAddresses() []*net.UDPAddr
- func (ln *Listener) Close() (err error)
- func (ln *Listener) IsTappedIP(ip net.IP) bool
- func (ln *Listener) LocalAddr() *net.UDPAddr
- func (ln *Listener) WriteMulticast(p []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) SetSendAddress ¶
SetSendAddress overrides the address that the connection sends to. This is used to handle CMD_ORIGIN_TAG.
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener holds all the UDP sockets we're listening on. We need a bunch of sockets. One socket on INADDR_ANY with a random port to send beacons from For each interface,
Listen on addr:5076 IP_MULTICAST_IF 127.0.0.1 IP_MULTICAST_LOOP 1 Listen on broadcast:5076 (if interface has broadcast flag)
One socket listening on 224.0.0.128 on lo
Listen on 224.0.0.128:5076 IP_ADD_MEMBERSHIP 224.0.0.128, 127.0.0.1
func (*Listener) BroadcastConn ¶
func (*Listener) BroadcastSendAddresses ¶
Click to show internal directories.
Click to hide internal directories.