| 123456789101112131415161718192021222324252627 | 
							- // SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
 
- // SPDX-License-Identifier: MIT
 
- // This example program showcases the use of the mDNS server by publishing "pion-test.local"
 
- package main
 
- import (
 
- 	"net"
 
- 	"golang.org/x/net/ipv4"
 
- 	"golib/pkg/mdns"
 
- )
 
- func main() {
 
- 	l, err := net.ListenUDP(mdns.NetType, mdns.Address)
 
- 	if err != nil {
 
- 		panic(err)
 
- 	}
 
- 	_, err = mdns.Server(ipv4.NewPacketConn(l), &mdns.Config{
 
- 		LocalNames: []string{"pion-test.local"},
 
- 	})
 
- 	if err != nil {
 
- 		panic(err)
 
- 	}
 
- 	select {}
 
- }
 
 
  |