udt
Interface CongestionControl

All Known Implementing Classes:
SimpleTCP, UDTCongestionControl

public interface CongestionControl

congestion control interface


Method Summary
 void close()
          Callback function to be called when a UDT connection is closed.
 long getAckInterval()
          get the ACK interval.
 double getCongestionWindowSize()
          get the congestion window size
 long getEstimatedLinkCapacity()
          get the current value of the estimated link capacity
 long getPacketArrivalRate()
          get the current value of the packet arrival
 double getSendInterval()
          get the current value of the inter-packet interval in microseconds
 void init()
          Callback function to be called (only) at the start of a UDT connection.
 void onACK(long ackSeqno)
          Callback function to be called when an ACK packet is received.
 void onLoss(List<Integer> lossInfo)
          Callback function to be called when a loss report is received.
 void onPacketReceive(long packetSeqNo)
          Callback function to be called when a data packet is received.
 void onPacketSend(long packetSeqNo)
          Callback function to be called when a data packet is sent.
 void onTimeout()
          Callback function to be called when a timeout event occurs
 void setAckInterval(long ackInterval)
          set the ACK interval.
 void setRTT(long rtt, long rttVar)
          set roundtrip time and associated variance
 void updatePacketArrivalRate(long rate, long linkCapacity)
          update packet arrival rate and link capacity with the values received in an ACK packet
 

Method Detail

init

void init()
Callback function to be called (only) at the start of a UDT connection. when the UDT socket is conected


setRTT

void setRTT(long rtt,
            long rttVar)
set roundtrip time and associated variance

Parameters:
rtt - - round trip time in microseconds
rttVar - - round trip time variance in microseconds

updatePacketArrivalRate

void updatePacketArrivalRate(long rate,
                             long linkCapacity)
update packet arrival rate and link capacity with the values received in an ACK packet

Parameters:
rate - - packet rate in packets per second
linkCapacity - - estimated link capacity in packets per second

getPacketArrivalRate

long getPacketArrivalRate()
get the current value of the packet arrival


getEstimatedLinkCapacity

long getEstimatedLinkCapacity()
get the current value of the estimated link capacity


getSendInterval

double getSendInterval()
get the current value of the inter-packet interval in microseconds


getCongestionWindowSize

double getCongestionWindowSize()
get the congestion window size


getAckInterval

long getAckInterval()
get the ACK interval. If larger than 0, the receiver should acknowledge every n'th packet


setAckInterval

void setAckInterval(long ackInterval)
set the ACK interval. If larger than 0, the receiver should acknowledge every n'th packet


onACK

void onACK(long ackSeqno)
Callback function to be called when an ACK packet is received.

Parameters:
ackSeqno - - the data sequence number acknowledged by this ACK. see spec. page(16-17)

onLoss

void onLoss(List<Integer> lossInfo)
Callback function to be called when a loss report is received.

Parameters:
lossInfo - - list of sequence number of packets

onTimeout

void onTimeout()
Callback function to be called when a timeout event occurs


onPacketSend

void onPacketSend(long packetSeqNo)
Callback function to be called when a data packet is sent.

Parameters:
packetSeqNo - - the data packet sequence number

onPacketReceive

void onPacketReceive(long packetSeqNo)
Callback function to be called when a data packet is received.

Parameters:
packetSeqNo - - the data packet sequence number.

close

void close()
Callback function to be called when a UDT connection is closed.



Copyright © 2013 LittleShoot. All Rights Reserved.