Sha256: 9cdf3600beec6d18cb7b1bfdb8d2dc5655a84bd1587ad4a5b9d90627b7cb798b

Contents?: true

Size: 670 Bytes

Versions: 3

Compression:

Stored size: 670 Bytes

Contents

##
# Returned by DNSSD::Service#register

class DNSSD::Reply::Register < DNSSD::Reply

  ##
  # A domain for registration or browsing

  attr_reader :domain

  ##
  # The service name

  attr_reader :name

  ##
  # The service type

  attr_reader :type

  ##
  # Creates a Register, called internally by DNSSD::Service#register

  def initialize(service, flags, name, type, domain)
    super service, flags, nil

    set_names name, type, domain
  end

  def resolve
    service = DNSSD::Service.resolve name, type, domain
    service.first
  end

  def inspect # :nodoc:
    "#<%s:0x%x %p flags: %p>" % [
      self.class, object_id, fullname, @flags
    ]
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dnssd-3.0.2 lib/dnssd/reply/register.rb
dnssd-3.0.1 lib/dnssd/reply/register.rb
dnssd-3.0.0 lib/dnssd/reply/register.rb