Search in sources :

Example 1 with P2PNetworkConnection

use of network.bisq.api.model.P2PNetworkConnection 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;
}
Also used : P2PNetworkConnection(network.bisq.api.model.P2PNetworkConnection) P2PNetworkStatus(network.bisq.api.model.P2PNetworkStatus) NodeAddress(bisq.network.p2p.NodeAddress)

Aggregations

NodeAddress (bisq.network.p2p.NodeAddress)1 P2PNetworkConnection (network.bisq.api.model.P2PNetworkConnection)1 P2PNetworkStatus (network.bisq.api.model.P2PNetworkStatus)1