3
ModuleClientAPINeighborResults
Mees van der Wijk edited this page 2025-08-10 17:34:23 +02:00

ModuleClientApi - Neighbor Results

Class representing a group of Neighbors of the ModuleClientAPI User.

Methods

sendToAll

Send a packet to all neighbors in the result result.

NeighborResults.sendToAll(header, ...args);
Argument Type Description
header string The header of the message.
args any[] Data of any type.

forEach

Loop trough all neighbors in this result.

NeighborResults.forEach(callback);
Argument Type Description
callback ( Neighbor ):void Handler thats called for every neighbor in result.

getAll

Get all neighbors in this result.

NeighborResults.getAll();

Returns Neighbor[] Neighbors in result.

get

Get a neighbors in this result.

NeighborResults.get(index);
Argument Type Description
index number The index of the neighbor in this result.

Returns Neighbor Neighbor instance.

first

Get the first neighbors in this result.

NeighborResults.first();

Returns Neighbor Neighbor instance.

last

Get the last neighbors in this result.

NeighborResults.last();

Returns Neighbor Neighbor instance.

Constants

length

Amount of neighbors in the result.

NeighborResults.length;

[index]

Get a neighbor at a specific index

NeighborResults[index];
Argument Type Description
index number The index of the neighbor in this result.

Returns Neighbor Neighbor instance.