Package nxt.peer

Class NetworkMessage

java.lang.Object
nxt.peer.NetworkMessage
Direct Known Subclasses:
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

public abstract class NetworkMessage extends Object
NetworkMessage represents the messages exchanged between peers.

Each network message has a common prefix followed by the message payload

  • Message name (string)
  • Protocol level (short)
  • Field Details

    • MAX_ARRAY_LENGTH

      public static final int MAX_ARRAY_LENGTH
      Maximum byte array length
      See Also:
    • MAX_LIST_SIZE

      public static final int MAX_LIST_SIZE
      Maximum list size
      See Also:
    • MAX_LIST_SIZE_PRE_2_3_3

      public static final int MAX_LIST_SIZE_PRE_2_3_3
      The max list size used in versions 2.3.2 and before. TODO remove this constant after the network has upgraded to 2.3.3
      See Also:
    • messageId

      protected long messageId
      Message identifier
  • Method Details