Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ Using the library is very simple, here is an example of publishing a service ent

// Setup our service export
host, _ := os.Hostname()
info := []string{"My awesome service"},
service, _ := NewMDNSService(host, "_foobar._tcp", "", "", 8000, nil, info)
instance := fmt.Sprintf("%s:%d", host, 8000)
info := []string{"My awesome service"}
service, _ := NewMDNSService(instance, "_foobar._tcp", "", "", 8000, nil, info)

// Create the mDNS server, defer shutdown
server, _ := mdns.NewServer(&mdns.Config{Zone: service})
Expand Down
2 changes: 1 addition & 1 deletion zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Zone interface {

// MDNSService is used to export a named service by implementing a Zone
type MDNSService struct {
Instance string // Instance name (e.g. "hostService name")
Instance string // Instance name, must be unique (e.g. "hostName:port")
Service string // Service name (e.g. "_http._tcp.")
Domain string // If blank, assumes "local"
HostName string // Host machine DNS name (e.g. "mymachine.net.")
Expand Down