Package net.rudp
Class ReliableSocketProfile
- java.lang.Object
-
- net.rudp.ReliableSocketProfile
-
public class ReliableSocketProfile extends java.lang.ObjectThis class specifies the RUDP parameters of a socket.- Author:
- Adrian Granados
- See Also:
ReliableSocket
-
-
Field Summary
Fields Modifier and Type Field Description static intCUMULATIVE_ACK_TIMEOUTstatic intMAX_AUTO_RESETstatic intMAX_CUMULATIVE_ACKSstatic intMAX_OUT_OF_SEQUENCEstatic intMAX_OUTSTANDING_SEGSstatic intMAX_RECV_QUEUE_SIZEstatic intMAX_RETRANSstatic intMAX_SEGMENT_SIZEstatic intMAX_SEND_QUEUE_SIZEstatic intNULL_SEGMENT_TIMEOUTstatic intRETRANSMISSION_TIMEOUT
-
Constructor Summary
Constructors Constructor Description ReliableSocketProfile()Creates a profile with the default RUDP parameter values.ReliableSocketProfile(int maxSendQueueSize, int maxRecvQueueSize, int maxSegmentSize, int maxOutstandingSegs, int maxRetrans, int maxCumulativeAcks, int maxOutOfSequence, int maxAutoReset, int nullSegmentTimeout, int retransmissionTimeout, int cumulativeAckTimeout)Creates an profile with the specified RUDP parameter values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcumulativeAckTimeout()Returns the cumulative acknowledge timeout (ms).intmaxAutoReset()Returns the maximum number of consecutive auto resets.intmaxCumulativeAcks()Returns the maximum number of unacknowledged received segments.intmaxOutOfSequence()Returns the maximum number of out-of-sequence received segments.intmaxOutstandingSegs()Returns the maximum number of outstanding segments.intmaxRecvQueueSize()Returns the maximum receive queue size (packets).intmaxRetrans()Returns the maximum number of consecutive retransmissions (0 means unlimited).intmaxSegmentSize()Returns the maximum segment size (octets).intmaxSendQueueSize()Returns the maximum send queue size (packets).intnullSegmentTimeout()Returns the null segment timeout (ms).intretransmissionTimeout()Returns the retransmission timeout (ms).java.lang.StringtoString()
-
-
-
Field Detail
-
MAX_SEND_QUEUE_SIZE
public static final int MAX_SEND_QUEUE_SIZE
- See Also:
- Constant Field Values
-
MAX_RECV_QUEUE_SIZE
public static final int MAX_RECV_QUEUE_SIZE
- See Also:
- Constant Field Values
-
MAX_SEGMENT_SIZE
public static final int MAX_SEGMENT_SIZE
- See Also:
- Constant Field Values
-
MAX_OUTSTANDING_SEGS
public static final int MAX_OUTSTANDING_SEGS
- See Also:
- Constant Field Values
-
MAX_RETRANS
public static final int MAX_RETRANS
- See Also:
- Constant Field Values
-
MAX_CUMULATIVE_ACKS
public static final int MAX_CUMULATIVE_ACKS
- See Also:
- Constant Field Values
-
MAX_OUT_OF_SEQUENCE
public static final int MAX_OUT_OF_SEQUENCE
- See Also:
- Constant Field Values
-
MAX_AUTO_RESET
public static final int MAX_AUTO_RESET
- See Also:
- Constant Field Values
-
NULL_SEGMENT_TIMEOUT
public static final int NULL_SEGMENT_TIMEOUT
- See Also:
- Constant Field Values
-
RETRANSMISSION_TIMEOUT
public static final int RETRANSMISSION_TIMEOUT
- See Also:
- Constant Field Values
-
CUMULATIVE_ACK_TIMEOUT
public static final int CUMULATIVE_ACK_TIMEOUT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ReliableSocketProfile
public ReliableSocketProfile()
Creates a profile with the default RUDP parameter values. Note: According to the RUDP protocol's draft, the default maximum number of retransmissions is 3. However, if packet drops are too high, the connection may get stall unless the sender continues to retransmit packets that have not been unacknowledged. We will use 0 instead, which means unlimited.
-
ReliableSocketProfile
public ReliableSocketProfile(int maxSendQueueSize, int maxRecvQueueSize, int maxSegmentSize, int maxOutstandingSegs, int maxRetrans, int maxCumulativeAcks, int maxOutOfSequence, int maxAutoReset, int nullSegmentTimeout, int retransmissionTimeout, int cumulativeAckTimeout)Creates an profile with the specified RUDP parameter values.- Parameters:
maxSendQueueSize- maximum send queue size (packets).maxRecvQueueSize- maximum receive queue size (packets).maxSegmentSize- maximum segment size (octets) (must be at least 22).maxOutstandingSegs- maximum number of outstanding segments.maxRetrans- maximum number of consecutive retransmissions (0 means unlimited).maxCumulativeAcks- maximum number of unacknowledged received segments.maxOutOfSequence- maximum number of out-of-sequence received segments.maxAutoReset- maximum number of consecutive auto resets (not used).nullSegmentTimeout- null segment timeout (ms).retransmissionTimeout- retransmission timeout (ms).cumulativeAckTimeout- cumulative acknowledge timeout (ms).
-
-
Method Detail
-
maxSendQueueSize
public int maxSendQueueSize()
Returns the maximum send queue size (packets).
-
maxRecvQueueSize
public int maxRecvQueueSize()
Returns the maximum receive queue size (packets).
-
maxSegmentSize
public int maxSegmentSize()
Returns the maximum segment size (octets).
-
maxOutstandingSegs
public int maxOutstandingSegs()
Returns the maximum number of outstanding segments.
-
maxRetrans
public int maxRetrans()
Returns the maximum number of consecutive retransmissions (0 means unlimited).
-
maxCumulativeAcks
public int maxCumulativeAcks()
Returns the maximum number of unacknowledged received segments.
-
maxOutOfSequence
public int maxOutOfSequence()
Returns the maximum number of out-of-sequence received segments.
-
maxAutoReset
public int maxAutoReset()
Returns the maximum number of consecutive auto resets.
-
nullSegmentTimeout
public int nullSegmentTimeout()
Returns the null segment timeout (ms).
-
retransmissionTimeout
public int retransmissionTimeout()
Returns the retransmission timeout (ms).
-
cumulativeAckTimeout
public int cumulativeAckTimeout()
Returns the cumulative acknowledge timeout (ms).
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-