-
Notifications
You must be signed in to change notification settings - Fork 139
/
PeerState.cs
38 lines (33 loc) · 1017 Bytes
/
PeerState.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
namespace Libplanet.Net
{
/// <summary>
/// Represents a <see cref="BoundPeer"/>'s state in the routing table.
/// </summary>
public class PeerState
{
internal PeerState(BoundPeer peer, DateTimeOffset lastUpdated)
{
Peer = peer;
LastUpdated = lastUpdated;
LastChecked = null;
Latency = null;
}
/// <summary>
/// <see cref="BoundPeer"/> of the state.
/// </summary>
public BoundPeer Peer { get; set; }
/// <summary>
/// Last time messages were exchanged.
/// </summary>
public DateTimeOffset LastUpdated { get; internal set; }
/// <summary>
/// Last time the peer was verified.
/// </summary>
public DateTimeOffset? LastChecked { get; internal set; }
/// <summary>
/// Delay of verification in milliseconds.
/// </summary>
public TimeSpan? Latency { get; internal set; }
}
}