Class DataChannelReliability

java.lang.Object
tel.schich.libdatachannel.DataChannelReliability

public class DataChannelReliability extends Object
The DataChannel reliability settings.
  • Field Details

  • Constructor Details

    • DataChannelReliability

      public DataChannelReliability(boolean unordered, boolean unreliable, long maxPacketLifeTime, int maxRetransmits)
  • Method Details

    • isUnordered

      public boolean isUnordered()
      if true, the Data Channel will not enforce message ordering, else it will be ordered
      Returns:
      whether this channel is unordered
    • withUnordered

      public DataChannelReliability withUnordered(boolean unordered)
    • isUnreliable

      public boolean isUnreliable()
      if true, the Data Channel will not enforce strict reliability, else it will be reliable
      Returns:
      true if the channel is unreliable
    • withUnreliable

      public DataChannelReliability withUnreliable(boolean unreliable)
    • maxPacketLifeTime

      public Duration maxPacketLifeTime()
      if unreliable, the time window in milliseconds during which transmissions and retransmissions may occur
      Returns:
      the maximum packet lifetime
    • withMaxPacketLifeTime

      public DataChannelReliability withMaxPacketLifeTime(Duration maxPacketLifeTime)
    • maxRetransmits

      public int maxRetransmits()
      if unreliable is true and maxPacketLifeTime is 0, the maximum number of attempted retransmissions (0 means no retransmission)
      Returns:
      the maximum number of retransmits
    • withMaxRetransmits

      public DataChannelReliability withMaxRetransmits(int maxRetransmits)