Class GetHeadersMessage

  • All Implemented Interfaces:
    Message

    public class GetHeadersMessage
    extends Object
    implements Message

    GetHeadersMessage class.

    • Constructor Detail

      • GetHeadersMessage

        public GetHeadersMessage​(Int version,
                                 Int numHashes,
                                 byte[] startBlock,
                                 byte[] endBlock)

        Constructor for GetHeadersMessage.

        Parameters:
        version - a Int object
        numHashes - a Int object
        startBlock - an array of byte objects
        endBlock - an array of byte objects
    • Method Detail

      • getCommand

        public byte[] getCommand()

        getCommand.

        Specified by:
        getCommand in interface Message
        Returns:
        an array of byte objects
      • serialize

        public byte[] serialize()

        serialize.

        Serialize this message to send over the network
        Specified by:
        serialize in interface Message
        Returns:
        an array of byte objects