java.lang.Object
net.i2p.router.transport.udp.SSU2Payload.Block
net.i2p.router.transport.udp.SSU2Payload.RelayRequestBlock
- Enclosing class:
SSU2Payload
Block containing relay request data. Used to request relay services from a peer.
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionintReturn the relay request data length.intwriteData(byte[] tgt, int off) Write the relay request block data to the target array.Methods inherited from class SSU2Payload.Block
getTotalLength, getType, toString, write
Field Details
d
private final byte[] dThe 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:
getDataLengthin classSSU2Payload.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:
writeDatain classSSU2Payload.Block- Parameters:
tgt- target array to write tooff- offset in the target array- Returns:
- the new offset after writing