mdns

package module
v0.0.0-...-b7f1c36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2014 License: MIT Imports: 3 Imported by: 0

README

go-mdns

feature

  • discover service by multicast udp
  • only discover function

usage

client := new(mdns.Client)
client.Discover("_airplay._tcp.local.", func(msg *dns.Msg) {
        for _, rr := range msg.Extra {
                switch rr := rr.(type) {
                case *dns.A:
                        fmt.Println(rr.Header().Name, "=>", rr.A)
                default:
                }
        }
})

see also

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Timeout time.Duration
	// contains filtered or unexported fields
}

func (*Client) Discover

func (c *Client) Discover(domain string, cb func(*dns.Msg))

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL