- All Known Implementing Classes:
ECIESAEADEngine.PLCallback
- Enclosing class:
RatchetPayload
public static interface RatchetPayload.PayloadCallback
For all callbacks, recommend throwing exceptions only from the handshake. Exceptions will get thrown out of
RatchetPayload.processPayload(I2PAppContext, RatchetPayload.PayloadCallback, byte[], int, int, boolean) and prevent processing of succeeding blocks.Method Summary
All MethodsModifier and TypeMethodDescriptionvoidgotAck(int id, int n) Receive an ACK block.voidReceive an ACK request block.voidgotDateTime(long time) Receive a datetime block.voidgotGarlic(GarlicClove clove) Receive a garlic clove block.voidgotNextKey(NextSessionKey nextKey) Receive a next key block.voidgotOptions(byte[] options, boolean isHandshake) Receive an options block.voidgotPadding(int paddingLength, int frameLength) For stats.voidgotPN(int pn) Receive a packet number block.voidgotTermination(int reason) Receive a termination block.voidgotUnknown(int type, int len) Receive an unknown block.
Method Details
gotDateTime
Receive a datetime block.- Parameters:
time- the peer's expiry timestamp, in ms since the epoch- Throws:
DataFormatException- on bad data
gotGarlic
gotOptions
Receive an options block.- Parameters:
options- the option bytesisHandshake- true only for message 3 part 2- Throws:
DataFormatException- on bad data
gotTermination
void gotTermination(int reason) Receive a termination block.- Parameters:
reason- 0-255
gotPN
void gotPN(int pn) Receive a packet number block.- Parameters:
pn- 0-65535
gotNextKey
gotAck
void gotAck(int id, int n) Receive an ACK block.- Parameters:
id- the key IDn- the message count acknowledged for that key
gotAckRequest
void gotAckRequest()Receive an ACK request block.gotPadding
void gotPadding(int paddingLength, int frameLength) For stats.- Parameters:
paddingLength- the number of padding bytes, not including the 3-byte block headerframeLength- the total size of the frame, including all blocks and block headers
gotUnknown
void gotUnknown(int type, int len) Receive an unknown block.- Parameters:
type- the block typelen- the block length