81 Commits

Author SHA1 Message Date
Asim Aslam
32c17f6b3e
Merge pull request #11 from nikosk686/bugfix-ipv4-or-6-unavailability
Fixes new client or server creation failure when one of ipv4 or ipv6 is unavailable
2019-05-23 08:37:24 +01:00
Nikos Kitmeridis
a56f86575d Fixes new client or server creation failure when one of ipv4 or ipv6 is unavailable 2019-05-22 22:53:26 +03:00
Asim Aslam
3a29b6675e Add go mod v0.1.0 2019-01-30 11:25:02 +00:00
Asim Aslam
9c3770d405 update readme 2018-12-01 23:03:01 +00:00
Asim Aslam
9ff06210ab update readme 2018-12-01 23:02:27 +00:00
Asim Aslam
97dbada439 update to stdlib context 2018-12-01 22:29:15 +00:00
Asim Aslam
cdf30746f9 Merge pull request #4 from mjgarton/contexts
Allow timeout and cancellation via context.Context
2016-09-29 17:56:50 +01:00
Martin Garton
8cfcc9a3d9 Allow timeout and cancellation via context.Context
Introduce context.Context to enable cancellation in addition to the
existing timeout functionality.  To retain compatability, Timeout is
still available but will only be used if Context is not set.

We use x/net/context.Context for the moment instead of context.Context
in order to avoid creating a requirement on Go 1.7
2016-09-29 17:46:10 +01:00
Asim Aslam
4725bf05ee Merge pull request #3 from mjgarton/allowExitWhenCallerDoesntConsume
Allow timeout to complete
2016-09-29 08:00:07 +01:00
Martin Garton
bf498197cb Allow timeout to complete
When the timeout it reached, the query can still fail to complete if the
caller isn't consuming the results from the channel.  This change allows
the query to exit in any case.
2016-09-28 20:27:32 +01:00
Asim Aslam
ab413e42fe Merge pull request #1 from mjgarton/fixDomainLoopup
Fix domain lookup in some cases
2016-07-06 11:36:16 +01:00
Asim Aslam
a30f6551c5 Merge pull request #2 from mjgarton/cleanupOnExit
Clean up probe goroutine when shutting down
2016-07-06 11:34:57 +01:00
Martin Garton
71c466253c Fix domain lookup in some cases 2016-07-06 10:54:33 +01:00
Martin Garton
3124d713dc Clean up probe goroutine when shutting down 2016-07-06 09:19:32 +01:00
Asim
d37bec73c9 Fix the udp6 binding error 2016-05-01 19:45:12 +01:00
Asim
f4bad1caf6 Add the probing, announcements and shutdown. Add client Listen which can be used for a watcher 2016-05-01 18:55:42 +01:00
Asim
2963a9d96a We don't care about these messages either 2016-04-30 12:24:37 +01:00
Asim
6304000b09 Strip verbose close message 2016-04-30 12:22:29 +01:00
Asim
9eb0a44d94 godoc link 2016-04-30 10:53:26 +01:00
Asim
f44a178e63 Change import in readme 2016-04-30 00:09:01 +01:00
Asim
e683f11ef9 There's now no owner... it is owned by the world 2016-04-30 00:08:24 +01:00
Asim
7f3f4b65ae Remove noise https://github.com/hashicorp/mdns/pull/34 2016-04-29 23:55:12 +01:00
Asim
3590a367d8 Add examples https://github.com/hashicorp/mdns/pull/42 2016-04-29 23:53:34 +01:00
Asim
feb0629af0 Add https://github.com/hashicorp/mdns/pull/36 RFC-6762-compliant DNS-SD 2016-04-29 23:48:11 +01:00
Asim
28e58969dc use official golang/net https://github.com/hashicorp/mdns/pull/45 2016-04-29 23:37:04 +01:00
Asim
b8712a0af4 Add https://github.com/hashicorp/mdns/pull/50 2016-04-29 23:34:13 +01:00
Ryan Uber
9d85cf22f9 Merge pull request #48 from stapelberg/master
Expose rr.Txt as []string instead of joining it with “|”.
2015-12-05 20:24:12 -08:00
Michael Stapelberg
83d7e99a21 Expose rr.Txt as []string instead of joining it with “|”.
Joining the different fields into a single string is problematic when
the fields contain the separator character “|” themselves.

As an example, I’ve named my chromecast “Hendrix|test”, and this happens
when I print a ServiceEntry:

ServiceEntry: &{Name:Hendrix|test._googlecast._tcp.local. Host:Hendrix|test.local. AddrV4:10.0.0.184 AddrV6:<nil> Port:8009 Info:id=3fc948dbfebcf5d7ec77d7b043dce81e|ve=04|md=Chromecast Audio|ic=/setup/icon.png|fn=Hendrix|test|ca=4|st=0|bs=FA8FCA928304|rs= Addr:10.0.0.184 hasTXT:true sent:true}

When using strings.Split, I would not correctly parse the fn= field.

With the new InfoFields member, this problem can be avoided entirely.
2015-11-27 17:21:23 +01:00
Armon Dadgar
2b439d3701 Merge pull request #31 from yinghau76/master
Consider additional section when merging RR for a service entry
2015-03-17 10:42:56 -07:00
Patrick Tsai
e4fb98e255 Consider additional section when merging RR for a service entry 2015-03-16 01:38:10 -07:00
Armon Dadgar
e23dbc9d18 Merge pull request #30 from azlyth/master
Fix double period at end of formatted hostname
2015-03-09 09:57:00 -07:00
Peter Valdez
8c52853f0a Fix double period at end of tmpHostname. 2015-03-08 21:53:16 -04:00
Armon Dadgar
eb98accb64 Revert "Send response to multicast address if requested"
This reverts commit c6d75aa8ab07e215beb8c1315155e55d3ca830c6.

Conflicts:
	server.go
2015-02-12 18:22:57 -08:00
Armon Dadgar
e4aba3430c Update README 2014-11-24 11:28:51 -08:00
Armon Dadgar
c01b6b75d5 Merge pull request #26 from brutella/service-enum
Respond to _services._dns-sd._udp.<domain> dns query
2014-11-07 14:35:48 -08:00
Matthias Hochgatterer
603e32d4fa Add unit test 2014-11-07 13:44:29 +01:00
Matthias Hochgatterer
d456efdb2f Respond to _services._dns-sd._udp.<domain> dns question 2014-11-07 13:28:08 +01:00
Armon Dadgar
a57b761c4d Style cleanup 2014-11-06 16:38:13 -08:00
Armon Dadgar
a26b69e7bc Merge pull request #24 from brutella/multicast-response
Send response to multicast address if requested
2014-11-06 16:31:26 -08:00
Matthias Hochgatterer
c6d75aa8ab Send response to multicast address if requested 2014-11-05 12:32:13 +01:00
Armon Dadgar
f4e9d517ac Fixing tests 2014-11-03 12:55:52 -08:00
Armon Dadgar
317513147d Merge pull request #21 from gonzojive/handle-query
Make mDNS server response more compatible with RFC 6762 spec.
2014-11-03 12:53:43 -08:00
Armon Dadgar
40f4a787fc Merge pull request #18 from gonzojive/hostname-questions
Make MDNSService respond to questions for A/AAAA records about its hostname.
2014-11-03 12:08:13 -08:00
Armon Dadgar
827e8b390b Merge pull request #17 from gonzojive/refactor-zone
Refactor mdns.MDNSService API in zone.go.
2014-11-03 12:07:28 -08:00
Armon Dadgar
b720948f88 Merge pull request #23 from ryanuber/fork-net
Switch to fork of go.net
2014-11-03 11:42:22 -08:00
Ryan Uber
d83f28beed Switch to fork of go.net 2014-11-03 11:36:47 -08:00
Armon Dadgar
075c214825 Merge pull request #19 from gonzojive/default-ttl
Update defaultTTL to 120 seconds.
2014-10-20 10:56:37 -07:00
Red Daly
1ec3c33419 Merge branch 'master' of github.com:armon/mdns into refactor-zone 2014-10-17 15:50:33 -07:00
Red Daly
68622dea49 Make mDNS server response more compatible with RFC 6762 spec.
- dns.Msg construction is now explicit, with comments pointing to the RFC about
  the values of each field.
- dns.Msg responses no longer contain a Question section, which is not allowed
  according to the spec.
- handleQuestion's interface returns both unicast and multicast answer records.
  (Note: These are not yet treated differently by the sendResponse method.)
- removed unused error return value of handleQuestion
2014-10-17 15:42:54 -07:00
Red Daly
4585af0093 Update defaultTTL to 120 seconds. 2014-10-17 13:54:08 -07:00