Documentation ¶
Index ¶
- Constants
- func GetAddress(rawAddr string) (addr *net.UDPAddr, err error)
- func GetAddressesAndInterfaces(rawIntfc, rawAddr string) (addr *net.UDPAddr, intfc *net.Interface, srcAddr *net.UDPAddr, err error)
- func GetDefaultInterfaceName() (string, error)
- func GetFreePort() (int, error)
- func GetNetwork(rawAddr string) string
- func GetReceiverConn(addr *net.UDPAddr, intfc *net.Interface) (conn *net.UDPConn, err error)
- func GetSenderConn(addr *net.UDPAddr, srcAddr *net.UDPAddr) (conn *net.UDPConn, err error)
- type Manager
- func (m *Manager) GetRawSrcAddr(dstAddr *net.UDPAddr) (*net.UDPAddr, error)
- func (m *Manager) GetReceiver(dstAddr *net.UDPAddr, interfaceName string) (*Receiver, error)
- func (m *Manager) GetSender(dstAddr *net.UDPAddr) (*Sender, error)
- func (m *Manager) RegisterCallback(dstAddr *net.UDPAddr, interfaceName string, ...) error
- func (m *Manager) Send(dstAddr *net.UDPAddr, b []byte) error
- func (m *Manager) Start()
- func (m *Manager) Stop()
- func (m *Manager) UnregisterCallback(dstAddr *net.UDPAddr, interfaceName string, ...) error
- type Receiver
- type Sender
Constants ¶
View Source
const MaxDatagramSize = 65507
View Source
const Timeout = time.Second * 1
View Source
const UDPv4 = "udp4"
View Source
const UDPv6 = "udp6"
Variables ¶
This section is empty.
Functions ¶
func GetDefaultInterfaceName ¶
TODO: DRY this up w/ the above
func GetNetwork ¶
func GetReceiverConn ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
func (*Manager) GetRawSrcAddr ¶
func (*Manager) GetReceiver ¶
func (*Manager) RegisterCallback ¶
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
func (*Receiver) RegisterCallback ¶
Click to show internal directories.
Click to hide internal directories.