| Class | Easyjour::Service |
| In: |
lib/easyjour.rb
lib/easyjour.rb |
| Parent: | Object |
# File lib/easyjour.rb, line 25
25: def initialize(name, service, port, text_record_hash = {}, protocol = :tcp)
26: text_record = DNSSD::TextRecord.new
27: text_record_hash.each do |key, value|
28: text_record[key] = value
29: end
30:
31: @service = DNSSD.register(name, Easyjour.type_from_parts(service, protocol), 'local', port, text_record.encode, DNSSD::Flags::Add) do |reply|
32: end
33: end
# File lib/easyjour.rb, line 25
25: def initialize(name, service, port, text_record_hash = {}, protocol = :tcp)
26: text_record = DNSSD::TextRecord.new
27: text_record_hash.each do |key, value|
28: text_record[key] = value
29: end
30:
31: @service = DNSSD.register(name, Easyjour.type_from_parts(service, protocol), 'local', port, text_record.encode, DNSSD::Flags::Add) do |reply|
32: end
33: end