Class: HostEntry

net~HostEntry(addr, src)

Host Entry

Constructor

new HostEntry(addr, src)

Create a host entry.

Parameters:
Name Type Description
addr NetAddress
src NetAddress
Source:

Methods

(static) fromJSON(json, network) → {HostEntry}

Instantiate host entry from json object.

Parameters:
Name Type Description
json Object
network Network
Source:
Returns:
Type
HostEntry

(static) fromOptions(addr, src) → {HostEntry}

Instantiate host entry from options.

Parameters:
Name Type Description
addr NetAddress
src NetAddress
Source:
Returns:
Type
HostEntry

chance(now) → {Number}

Get host priority.

Parameters:
Name Type Description
now Number
Source:
Returns:
Type
Number

(private) fromJSON(json, network) → {HostEntry}

Inject properties from json object.

Parameters:
Name Type Description
json Object
network Network
Source:
Returns:
Type
HostEntry

(private) fromOptions(addr, src) → {HostEntry}

Inject properties from options.

Parameters:
Name Type Description
addr NetAddress
src NetAddress
Source:
Returns:
Type
HostEntry

inspectSymbol() → {Object}

Inspect host address.

Source:
Returns:
Type
Object

key() → {String}

Get key suitable for a hash table (hostname).

Source:
Returns:
Type
String

toJSON() → {Object}

Convert host entry to json-friendly object.

Source:
Returns:
Type
Object