hashicorp / hashicorp/mdns

No results ?

Open
#7 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.4k
Forks
225
Avg merge
15h 34m
Merged PRs (30d)
3

Description

Hi,

I'm trying to complete my tool by discovering xbmc jsonrpc service that is published via zeroconf.

Avahi-tools give me the correct output:

```
$ avahi-browse -a -d local
...
+ wlp2s0 IPv4 XBMC (raspbmc) _xbmc-events._udp local
+ wlp2s0 IPv4 XBMC (raspbmc) _xbmc-jsonrpc-h._tcp local
+ wlp2s0 IPv4 XBMC (raspbmc) _xbmc-jsonrpc._tcp local
```

But, taking your example in README, I've got no response...

``` go
package main

import (
"fmt"
"github.com/armon/mdns"
)

func main() {

entriesCh := make(chan *mdns.ServiceEntry, 4)
go func() {
for entry := range entriesCh {
fmt.Printf("Got new entry: %v\n", entry)
}
}()

// Start the lookup
mdns.Lookup("_xbmc-jsonrpc._tcp", entriesCh)
close(entriesCh)
}
```

What am I doing wrong ?

Thanks :)

EDIT:

It seems that I can only lookup services on localhost. I tried with "_workstation._tcp" and the program only return my current computer...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.