Update README
This commit is contained in:
parent
c01b6b75d5
commit
e4aba3430c
@ -13,13 +13,8 @@ Using the library is very simple, here is an example of publishing a service ent
|
|||||||
|
|
||||||
// Setup our service export
|
// Setup our service export
|
||||||
host, _ := os.Hostname()
|
host, _ := os.Hostname()
|
||||||
service := &mdns.MDNSService{
|
info := []string{"My awesome service"},
|
||||||
Instance: host,
|
service, _ := NewMDNSService(host, "_foobar._tcp", "", "", 8000, nil, info)
|
||||||
Service: "_foobar._tcp",
|
|
||||||
Port: 8000,
|
|
||||||
Info: "My awesome service",
|
|
||||||
}
|
|
||||||
service.Init()
|
|
||||||
|
|
||||||
// Create the mDNS server, defer shutdown
|
// Create the mDNS server, defer shutdown
|
||||||
server, _ := mdns.NewServer(&mdns.Config{Zone: service})
|
server, _ := mdns.NewServer(&mdns.Config{Zone: service})
|
||||||
|
Loading…
Reference in New Issue
Block a user