Parent

Methods

DNSSD::Reply::AddrInfo

Created by DNSSD::Service#getaddrinfo

Attributes

address[R]

IP address of host

hostname[R]

Host name

port[R]

Port name

ttl[R]

Time to live see #

Public Class Methods

new(service, flags, interface, hostname, sockaddr, ttl) click to toggle source

Creates a new AddrInfo, called internally by DNSSD::Service#getaddrinfo

    # File lib/dnssd/reply/addr_info.rb, line 29
29:   def initialize(service, flags, interface, hostname, sockaddr, ttl)
30:     super service, flags, interface
31: 
32:     @hostname = hostname
33:     @port, @address = Socket.unpack_sockaddr_in sockaddr
34: 
35:     @created = Time.now
36:     @ttl = ttl
37:   end

Public Instance Methods

expired?() click to toggle source

Has this AddrInfo passed its TTL?

    # File lib/dnssd/reply/addr_info.rb, line 42
42:   def expired?
43:     Time.now > @created + ttl
44:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.