Class CounterPayloadGenerator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long mCount  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] generate()
      Generate a payload of a frame.
      private long increment()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mCount

        private long mCount
    • Constructor Detail

      • CounterPayloadGenerator

        CounterPayloadGenerator()
    • Method Detail

      • generate

        public byte[] generate()
        Description copied from interface: PayloadGenerator
        Generate a payload of a frame.

        Note that the maximum payload length of control frames (e.g. ping frames) is 125 in bytes. Therefore, the length of a byte array returned from this method must not exceed 125 bytes.

        Specified by:
        generate in interface PayloadGenerator
        Returns:
        A payload of a frame.
      • increment

        private long increment()