Interface RatchetPayload.PayloadCallback

  • Enclosing class:
    RatchetPayload

    public static interface RatchetPayload.PayloadCallback
    For all callbacks, recommend throwing exceptions only from the handshake. Exceptions will get thrown out of processPayload() and prevent processing of succeeding blocks.
    • Method Detail

      • gotTermination

        void gotTermination​(int reason,
                            long lastReceived)
        Parameters:
        lastReceived - in theory could wrap around to negative, but very unlikely
      • gotNextKey

        void gotNextKey​(NextSessionKey nextKey)
        Parameters:
        nextKey - the next one
      • gotAck

        void gotAck​(int id,
                    int n)
        Since:
        0.9.46
      • gotAckRequest

        void gotAckRequest()
        Parameters:
        di - may be null
        Since:
        0.9.46
      • gotPadding

        void gotPadding​(int paddingLength,
                        int frameLength)
        For stats.
        Parameters:
        paddingLength - the number of padding bytes, not including the 3-byte block header
        frameLength - the total size of the frame, including all blocks and block headers
      • gotUnknown

        void gotUnknown​(int type,
                        int len)