Package nss :: Module io :: Class HostEntry
[hide private]
[frames] | no frames]

Class HostEntry

object --+
         |
        HostEntry

HostEntry(addr)

An object used to encapsulate network address information for a specific host.

Instance Methods [hide private]
 
__init__(addr)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
 
__str__(x)
str(x)
 
get_network_address(port=0)
Returns the first network address associated with this HostEntry as a NetworkAddress object.
 
get_network_addresses(port=0)
Return a tuple of all possible network address associated with this HostEntry.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]
  aliases
tuple of aliases for host
  hostname
official name of host

Inherited from object: __class__

Method Details [hide private]

__init__(addr)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Parameters:
  • addr (string or NetworkAddr object) -
    May be either a string or a NetworkAddr object.
    • If addr is string it is equivalent to GetHostByName.
    • If addr is a NetworkAddress object it is equivalent to GetHostByAddr.
Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__str__(x)
(Informal representation operator)

 
str(x)
Overrides: object.__str__

get_network_address(port=0)

 
Returns the first network address associated with this HostEntry as a NetworkAddress object. Equivalent to get_network_addresses()[0]. Note, may return None if the HostEntry does not have address associated with it.
Parameters:
  • port (integer) - optional port value specifying the port to associate with the NetworkAddress.

get_network_addresses(port=0)

 
Return a tuple of all possible network address associated with this HostEntry. Each item in the returned tuple is a NetworkAddress object.