dnssd 1.1.0 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,30 +0,0 @@
1
- require 'dnssd'
2
-
3
- service = DNSSD::Service.advertise_http "Chad's server", 8808 do |service|
4
- p service
5
- #service.name_changed? {|name| my_widget.update(name) }
6
- end
7
- sleep 4
8
- service.stop
9
-
10
- # collects the resolve results and trys each one (overlap)...when one
11
- # succeeds, it cancels the other checks and returns.
12
-
13
- browser = DNSSD::Browser.for_http do |service|
14
- host, port = service.resolve #optionally returns [host, port, iface]
15
- end
16
-
17
- sleep 4
18
-
19
- browser.stop
20
- if browser.more_coming?
21
- puts "blah"
22
- end
23
- browser.service_discovered? {|service|}
24
- browser.service_lost? {|service|}
25
- browser.on_changed do
26
- # get current values for UI update
27
- end
28
- browser.all_current #=> [service1, service2]
29
- browser.changed?
30
-