Documentation ¶
Overview ¶
Package multicast provides utilities for network multicast.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RecvAddrResolver = &AddrResolver{Addr: "224.0.0.1:1900"}
Functions ¶
func SetRecvAddrIPv4 ¶
SetRecvAddrIPv4 updates multicast address where to receive packets. This never fail now.
func SetSendAddrIPv4 ¶
SetSendAddrIPv4 updates a UDP address to send multicast packets. This never fail now.
Types ¶
type AddrResolver ¶
type AddrResolver struct { Addr string // contains filtered or unexported fields }
type BytesDataProvider ¶
type BytesDataProvider []byte
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is multicast connection.
func Listen ¶
func Listen(r *AddrResolver) (*Conn, error)
Listen starts to receiving multicast messages.
func (*Conn) ReadPackets ¶
func (mc *Conn) ReadPackets(timeout time.Duration, h PacketHandler) error
ReadPackets reads multicast packets.
type DataProvider ¶
DataProvider provides a body of multicast message to send.
type InterfacesProviderFunc ¶
var InterfacesProvider InterfacesProviderFunc
InterfacesProvider specify a function to list all interfaces to multicast. If no provider are given, all possible interfaces will be used.
Click to show internal directories.
Click to hide internal directories.