Creates an empty routing table for a node at address.
capacity is how many routes to make room for, defaulting to
[ROUTING_DEFAULT_CAPACITY]. A capacity of zero floods every unknown
destination, which is the behaviour with no table at all.
Optionalcapacity: number | nullThe address this router answers for.
How many routes the table can hold.
Whether the table has learned nothing yet.
How many routes the table currently holds.
Returns what the known route to dst costs, or null when none is known.
Forgets the route to dst, for example after it stops answering.
Returns the neighbour to send a packet to on the way to dst, or null.
Learns a route from a packet that arrived.
When a packet from origin comes in through neighbour via at cost,
that neighbour is the way back. Returns whether the table changed.
Returns the whole route to dst, or null when none is known.
One node routing table, learned from the traffic the node hears.