Package org.bitcoindevkit
Class Peer
-
- All Implemented Interfaces:
-
org.bitcoindevkit.Disposable
public final class Peer implements Disposable
A peer to connect to over the Bitcoin peer-to-peer network.
-
-
Method Summary
Modifier and Type Method Description final IpAddressgetAddress()The IP address to reach the node. final UnitsetAddress(IpAddress address)The IP address to reach the node. final UShortgetPort()The port to reach the node. final UnitsetPort(UShort port)The port to reach the node. final BooleangetV2Transport()Does the remote node offer encrypted peer-to-peer connection. final UnitsetV2Transport(Boolean v2Transport)Does the remote node offer encrypted peer-to-peer connection. Unitdestroy()-
-
Method Detail
-
getAddress
final IpAddress getAddress()
The IP address to reach the node.
-
setAddress
final Unit setAddress(IpAddress address)
The IP address to reach the node.
-
getPort
final UShort getPort()
The port to reach the node. If none is provided, the default port for the selected network will be used.
-
setPort
final Unit setPort(UShort port)
The port to reach the node. If none is provided, the default port for the selected network will be used.
-
getV2Transport
final Boolean getV2Transport()
Does the remote node offer encrypted peer-to-peer connection.
-
setV2Transport
final Unit setV2Transport(Boolean v2Transport)
Does the remote node offer encrypted peer-to-peer connection.
-
-
-
-