Package nxt.peer
Class NetworkMessage.AddPeersMessage
java.lang.Object
nxt.peer.NetworkMessage
nxt.peer.NetworkMessage.AddPeersMessage
- Enclosing class:
- NetworkMessage
The AddPeers message is sent to a peer to update its peer list and it is also returned
as an asynchronous response to the GetPeers message
- Peer list
Each entry in the peer list has the following format:
- Announced address (string)
- Available services (long)
-
Nested Class Summary
Nested classes/interfaces inherited from class nxt.peer.NetworkMessage
NetworkMessage.AddPeersMessage, NetworkMessage.BlockchainStateMessage, NetworkMessage.BlockIdsMessage, NetworkMessage.BlockInventoryMessage, NetworkMessage.BlocksMessage, NetworkMessage.BundlerRateMessage, NetworkMessage.CumulativeDifficultyMessage, NetworkMessage.ErrorMessage, NetworkMessage.GetBlockMessage, NetworkMessage.GetCumulativeDifficultyMessage, NetworkMessage.GetInfoMessage, NetworkMessage.GetMilestoneBlockIdsMessage, NetworkMessage.GetNextBlockIdsMessage, NetworkMessage.GetNextBlocksMessage, NetworkMessage.GetPeersMessage, NetworkMessage.GetTransactionsMessage, NetworkMessage.GetUnconfirmedTransactionsMessage, NetworkMessage.MilestoneBlockIdsMessage, NetworkMessage.TransactionsInventoryMessage, NetworkMessage.TransactionsMessage -
Field Summary
Fields inherited from class nxt.peer.NetworkMessage
MAX_ARRAY_LENGTH, MAX_LIST_SIZE, MAX_LIST_SIZE_PRE_2_3_3, messageId -
Constructor Summary
ConstructorsConstructorDescriptionAddPeersMessage(List<? extends Peer> peerList) Construct an AddPeers message -
Method Summary
Modifier and TypeMethodDescriptionprotected NetworkMessageconstructMessage(ByteBuffer bytes) Construct the message from the message bytesGet the announced addressesGet the services
-
Constructor Details
-
AddPeersMessage
Construct an AddPeers message- Parameters:
peerList- Peer list
-
-
Method Details
-
constructMessage
protected NetworkMessage constructMessage(ByteBuffer bytes) throws BufferOverflowException, BufferUnderflowException, nxt.peer.NetworkException Construct the message from the message bytes- Overrides:
constructMessagein classNetworkMessage- Parameters:
bytes- Message bytes following the message name- Returns:
- Message
- Throws:
BufferOverflowException- Message buffer is too smallBufferUnderflowException- Message is too shortnxt.peer.NetworkException- Message is not valid
-
getAnnouncedAddresses
Get the announced addresses- Returns:
- Announced addresses
-
getServices
Get the services- Returns:
- Services
-