class SSU2Payload extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BLOCK_HEADER_SIZE |
static int |
BLOCK_TERMINATION |
Constructor and Description |
---|
SSU2Payload() |
Modifier and Type | Method and Description |
---|---|
static int |
processPayload(I2PAppContext ctx,
SSU2Payload.PayloadCallback cb,
byte[] payload,
int off,
int length,
boolean isHandshake,
RemoteHostId from)
Incoming payload.
|
static int |
writePayload(byte[] payload,
int off,
List<SSU2Payload.Block> blocks) |
public static final int BLOCK_HEADER_SIZE
public static final int BLOCK_TERMINATION
public static int processPayload(I2PAppContext ctx, SSU2Payload.PayloadCallback cb, byte[] payload, int off, int length, boolean isHandshake, RemoteHostId from) throws IOException, DataFormatException, I2NPMessageException
isHandshake
- true for Token Req, Retry, Sess Req, Sess Created; false for Sess Confirmedfrom
- for path challenge/response only, may be nullIOException
- on major errorsDataFormatException
- on parsing of individual blocksI2NPMessageException
- on parsing of I2NP blockpublic static int writePayload(byte[] payload, int off, List<SSU2Payload.Block> blocks)
payload
- writes to it starting at off