use of network.bisq.api.model.P2PNetworkStatus in project bisq-api by mrosseel.
the class BisqProxy method getP2PNetworkStatus.
public P2PNetworkStatus getP2PNetworkStatus() {
final P2PNetworkStatus p2PNetworkStatus = new P2PNetworkStatus();
final NodeAddress address = p2PService.getAddress();
if (null != address)
p2PNetworkStatus.address = address.getFullAddress();
p2PNetworkStatus.p2pNetworkConnection = p2PService.getNetworkNode().getAllConnections().stream().map(P2PNetworkConnection::new).collect(Collectors.toList());
p2PNetworkStatus.totalSentBytes = Statistic.totalSentBytesProperty().get();
p2PNetworkStatus.totalReceivedBytes = Statistic.totalReceivedBytesProperty().get();
return p2PNetworkStatus;
}
Aggregations