Interface IRoutingTable
Namespace: Libplanet.Net.Protocols
Assembly: Libplanet.Net.dll
Syntax
public interface IRoutingTable
Properties
| Improve this Doc View SourceCount
The number of peers in the table.
Declaration
int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
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 SourceAddPeer(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 |
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. |
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 |
Exceptions
Type | Condition |
---|---|
ArgumentException |