Package net.rudp

Class ReliableSocketProfile


  • public class ReliableSocketProfile
    extends java.lang.Object
    This class specifies the RUDP parameters of a socket.
    Author:
    Adrian Granados
    See Also:
    ReliableSocket
    • 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:
        toString in class java.lang.Object