|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectudt.UDTCongestionControl
public class UDTCongestionControl
default UDT congestion control.
The algorithm is adapted from the C++ reference implementation.
| Field Summary | |
|---|---|
protected long |
ackInterval
|
protected double |
congestionWindowSize
|
protected long |
estimatedLinkCapacity
|
protected long |
packetArrivalRate
|
protected double |
packetSendingPeriod
|
protected long |
roundTripTime
|
protected UDTSession |
session
|
protected UDTStatistics |
statistics
|
| Constructor Summary | |
|---|---|
UDTCongestionControl(UDTSession session)
|
|
| Method Summary | |
|---|---|
void |
close()
Callback function to be called when a UDT connection is closed. |
long |
getAckInterval()
get the ACK interval. |
double |
getCongestionWindowSize()
congestionWindowSize |
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final UDTSession session
protected final UDTStatistics statistics
protected long roundTripTime
protected long packetArrivalRate
protected long estimatedLinkCapacity
protected double packetSendingPeriod
protected double congestionWindowSize
protected long ackInterval
| Constructor Detail |
|---|
public UDTCongestionControl(UDTSession session)
| Method Detail |
|---|
public void init()
CongestionControl
init in interface CongestionControl
public void setRTT(long rtt,
long rttVar)
CongestionControl
setRTT in interface CongestionControlrtt - - round trip time in microsecondsrttVar - - round trip time variance in microseconds
public void updatePacketArrivalRate(long rate,
long linkCapacity)
CongestionControl
updatePacketArrivalRate in interface CongestionControlrate - - packet rate in packets per secondlinkCapacity - - estimated link capacity in packets per secondpublic long getPacketArrivalRate()
CongestionControl
getPacketArrivalRate in interface CongestionControlpublic long getEstimatedLinkCapacity()
CongestionControl
getEstimatedLinkCapacity in interface CongestionControlpublic double getSendInterval()
CongestionControl
getSendInterval in interface CongestionControlpublic long getAckInterval()
CongestionControl
getAckInterval in interface CongestionControlpublic void setAckInterval(long ackInterval)
CongestionControl
setAckInterval in interface CongestionControlpublic double getCongestionWindowSize()
getCongestionWindowSize in interface CongestionControlpublic void onACK(long ackSeqno)
CongestionControl
onACK in interface CongestionControlackSeqno - - the data sequence number acknowledged by this ACK.
see spec. page(16-17)public void onLoss(List<Integer> lossInfo)
CongestionControl
onLoss in interface CongestionControllossInfo - - list of sequence number of packetspublic void onTimeout()
CongestionControl
onTimeout in interface CongestionControlpublic void onPacketSend(long packetSeqNo)
CongestionControl
onPacketSend in interface CongestionControlpacketSeqNo - - the data packet sequence numberpublic void onPacketReceive(long packetSeqNo)
CongestionControl
onPacketReceive in interface CongestionControlpacketSeqNo - - the data packet sequence number.public void close()
CongestionControl
close in interface CongestionControl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||