Package org.drasyl.handler.peers
Class Peer
java.lang.Object
org.drasyl.handler.peers.Peer
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPeer
(Role role, InetSocketAddress inetAddress) Peer
(Role role, InetSocketAddress inetAddress, long rtt) Peer
(Role role, InetSocketAddress inetAddress, long sent, long last, long average, long best, long worst, double stDev) -
Method Summary
-
Field Details
-
RTTS_COUNT
public static final int RTTS_COUNT- See Also:
-
-
Constructor Details
-
Peer
public Peer(Role role, InetSocketAddress inetAddress, long sent, long last, long average, long best, long worst, double stDev) -
Peer
-
Peer
-
-
Method Details
-
role
-
inetAddress
-
sent
public long sent()- Returns:
- number of pings sent
-
last
public long last()- Returns:
- RTT of last ping
-
average
public double average()- Returns:
- average RTT
-
best
public long best()- Returns:
- best RTT
-
worst
public long worst()- Returns:
- worst RTT
-
stDev
public double stDev()- Returns:
- RTT standard deviation
-