Show / Hide Table of Contents

Interface IRoutingTable

Namespace: Libplanet.Net.Protocols
Assembly: Libplanet.Net.dll
Syntax
public interface IRoutingTable

Properties

| Improve this Doc View Source

Count

The number of peers in the table.

Declaration
int Count { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Peers

An IReadOnlyList<T> of peers in the table.

Declaration
IReadOnlyList<BoundPeer> Peers { get; }
Property Value
Type Description
IReadOnlyList<BoundPeer>

Methods

| Improve this Doc View Source

AddPeer(BoundPeer)

Adds the peer to the table.

Declaration
void AddPeer(BoundPeer peer)
Parameters
Type Name Description
BoundPeer peer

The BoundPeer to add.

Exceptions
Type Condition
ArgumentException

Thrown when peer's Address is equal to the Address of self.

| Improve this Doc View Source

Contains(BoundPeer)

Determines whether the IRoutingTable contains the specified key.

Declaration
bool Contains(BoundPeer peer)
Parameters
Type Name Description
BoundPeer peer

Key to locate in the IRoutingTable.

Returns
Type Description
Boolean

true if the IRoutingTable contains an element with the specified key; otherwise, false.

| Improve this Doc View Source

RemovePeer(BoundPeer)

Removes the peer to the table.

Declaration
bool RemovePeer(BoundPeer peer)
Parameters
Type Name Description
BoundPeer peer

The BoundPeer to remove.

Returns
Type Description
Boolean

true if the peer is successfully removed from IRoutingTable.

Exceptions
Type Condition
ArgumentException

Thrown when peer's Address is equal to the Address of self.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium