java.lang.Object
net.i2p.router.transport.udp.SSU2Payload.Block
net.i2p.router.transport.udp.SSU2Payload.RelayRequestBlock
Enclosing class:
SSU2Payload

public static class SSU2Payload.RelayRequestBlockextends SSU2Payload.Block
Block containing relay request data. Used to request relay services from a peer.
  • Field Details

    • d

      private final byte[] d
      The relay request payload.
  • Constructor Details

    • RelayRequestBlock

      public RelayRequestBlock(byte[] data)
      Create a relay request block.
      Parameters:
      data - the relay request data (excludes flag, includes signature)
  • Method Details

    • getDataLength

      public int getDataLength()
      Return the relay request data length.
      Specified by:
      getDataLength in class SSU2Payload.Block
      Returns:
      the data length
    • writeData

      public int writeData(byte[] tgt, int off)
      Write the relay request block data to the target array.
      Specified by:
      writeData in class SSU2Payload.Block
      Parameters:
      tgt - target array to write to
      off - offset in the target array
      Returns:
      the new offset after writing