ContactList

Manages contact lists returned from FIND_NODE queries

Constructor

new ContactList(key, contacts)

Parameters:
NameTypeDescription
keystring

Lookup key for this operation

contactsArray.<Bucket~contact>

List of contacts to initialize with

Members

active

Properties
NameTypeDescription
activeArray.<Bucket~contact>

Contacts in the list that are active

closest

Properties
NameTypeDescription
closestBucket~contact

The contact closest to the reference key

uncontacted

Properties
NameTypeDescription
uncontactedArray.<Bucket~contact>

Contacts in the list that have not been contacted

Methods

add(contacts)

Adds the given contacts to the list

Parameters:
NameTypeDescription
contactsArray.<Bucket~contact>

contacted(contact)

Marks the supplied contact as contacted

Parameters:
NameTypeDescription
contactBucket~contact

responded(contact)

Marks the supplied contact as active

Parameters:
NameTypeDescription
contactBucket~contact