Class Easyjour::Service
In: lib/easyjour.rb
lib/easyjour.rb
Parent: Object

Methods

new   new   stop   stop  

Public Class methods

[Source]

    # 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

[Source]

    # 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

Public Instance methods

Stops a service from being discoverable.

[Source]

    # File lib/easyjour.rb, line 36
36:     def stop
37:       @service.stop
38:     end

Stops a service from being discoverable.

[Source]

    # File lib/easyjour.rb, line 36
36:     def stop
37:       @service.stop
38:     end

[Validate]