Class NTCP2Options


  • class NTCP2Options
    extends Object
    NTCP2 Padding/Dummy/Delay configuration for data phase. Any other options TBD.
    Since:
    0.9.36
    • Constructor Detail

      • NTCP2Options

        public NTCP2Options​(float sendMin,
                            float sendMax,
                            float recvMin,
                            float recvMax,
                            int sendDummy,
                            int recvDummy,
                            int sendDelay,
                            int recvDelay)
    • Method Detail

      • getSendMin

        public float getSendMin()
      • getSendMax

        public float getSendMax()
      • getRecvMin

        public float getRecvMin()
      • getRecvMax

        public float getRecvMax()
      • getSendDummy

        public int getSendDummy()
      • getRecvDummy

        public int getRecvDummy()
      • getSendDelay

        public int getSendDelay()
      • getRecvDelay

        public int getRecvDelay()
      • merge

        public NTCP2Options merge​(NTCP2Options his)
        Get a combined config for this connection. If incompatible, prefer ours.
        Parameters:
        his - far end options (send is his send, recv is his recv)
        Returns:
        merged options from our perspective (send is our send, recv is our recv)
      • fromByteArray

        public static NTCP2Options fromByteArray​(byte[] options)
        Returns:
        null on error
        Since:
        0.9.37 consolidated from two places