Package tel.schich.libdatachannel
Class DataChannelReliability
java.lang.Object
tel.schich.libdatachannel.DataChannelReliability
The
DataChannel reliability settings.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataChannelReliability(boolean unordered, boolean unreliable, long maxPacketLifeTime, int maxRetransmits) -
Method Summary
Modifier and TypeMethodDescriptionbooleanif true, the Data Channel will not enforce message ordering, else it will be orderedbooleanif true, the Data Channel will not enforce strict reliability, else it will be reliableif unreliable, the time window in milliseconds during which transmissions and retransmissions may occurintif unreliable is true and maxPacketLifeTime is 0, the maximum number of attempted retransmissions (0 means no retransmission)withMaxPacketLifeTime(Duration maxPacketLifeTime) withMaxRetransmits(int maxRetransmits) withUnordered(boolean unordered) withUnreliable(boolean unreliable)
-
Field Details
-
DEFAULT
-
-
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
-
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
-
maxPacketLifeTime
if unreliable, the time window in milliseconds during which transmissions and retransmissions may occur- Returns:
- the maximum packet lifetime
-
withMaxPacketLifeTime
-
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
-