java.lang.Object
net.i2p.router.transport.udp.SSU2Payload.Block
net.i2p.router.transport.udp.SSU2Payload.RelayTagBlock
- Enclosing class:
SSU2Payload
Block containing relay tag data. Used to identify relay sessions.
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionintReturn the 4 byte relay tag data length.intwriteData(byte[] tgt, int off) Write the relay tag block data to the target array.Methods inherited from class SSU2Payload.Block
getTotalLength, getType, toString, write
Field Details
t
private final long tThe relay tag being introduced.
Constructor Details
RelayTagBlock
public RelayTagBlock(long tag) Create a relay tag block.- Parameters:
tag- the relay tag value
Method Details
getDataLength
public int getDataLength()Return the 4 byte relay tag data length.- Specified by:
getDataLengthin classSSU2Payload.Block- Returns:
- the data length
writeData
public int writeData(byte[] tgt, int off) Write the relay tag 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