package multicast
Import Path
github.com/koron/go-ssdp/internal/multicast (on go.dev)
Dependency Relation
imports 8 packages, and imported by one package
Involved Source Files
Package multicast provides utilities for network multicast.
interface.go
multicast.go
udp.go
Package-Level Type Names (total 7)
Addr string
func Listen(r *AddrResolver, opts ...ConnOption) (*Conn, error)
var RecvAddrResolver *AddrResolver
( BytesDataProvider) Bytes(ifi *net.Interface) []byte
BytesDataProvider : DataProvider
Conn is multicast connection.
Close closes a multicast connection.
LocalAddr returns local address to listen multicast packets.
ReadPackets reads multicast packets.
WriteTo sends a multicast message to interfaces.
*Conn : github.com/prometheus/common/expfmt.Closer
*Conn : io.Closer
func Listen(r *AddrResolver, opts ...ConnOption) (*Conn, error)
ConnOption is option for Listen()
func ConnSystemAssginedInterface() ConnOption
func ConnTTL(ttl int) ConnOption
func Listen(r *AddrResolver, opts ...ConnOption) (*Conn, error)
DataProvider provides a body of multicast message to send.
( DataProvider) Bytes(*net.Interface) []byte
BytesDataProvider
func (*Conn).WriteTo(dataProv DataProvider, to net.Addr) (int, error)
func (*Conn).ReadPackets(timeout time.Duration, h PacketHandler) error
Package-Level Functions (total 6)
ConnTTL returns as ConnOption that set default TTL to the connection.
Listen starts to receiving multicast messages.
SendAddr returns an address to send multicast UDP package.
SetRecvAddrIPv4 updates multicast address where to receive packets.
This never fail now.
SetSendAddrIPv4 updates a UDP address to send multicast packets.
This never fail now.
Package-Level Variables (total 3)
InterfacesProvider specify a function to list all interfaces to multicast.
If no provider are given, all possible interfaces will be used.
SystemAssignedInterface indicates use the system assigned multicast interface or not.
InterfacesProvider will be ignored when this is true.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |