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 IpAddress
getAddress()
The IP address to reach the node. final Unit
setAddress(IpAddress address)
The IP address to reach the node. final UShort
getPort()
The port to reach the node. final Unit
setPort(UShort port)
The port to reach the node. final Boolean
getV2Transport()
Does the remote node offer encrypted peer-to-peer connection. final Unit
setV2Transport(Boolean v2Transport)
Does the remote node offer encrypted peer-to-peer connection. Unit
destroy()
-
-
-
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.
-
-