udt.receiver
Class PacketPairWindow
java.lang.Object
udt.util.CircularArray<Long>
udt.receiver.PacketPairWindow
public class PacketPairWindow
- extends CircularArray<Long>
a circular array that records time intervals between two probing data packets.
It is used to determine the estimated link capacity.
- See Also:
CircularArray}
|
Constructor Summary |
PacketPairWindow(int size)
construct a new packet pair window with the given size |
PacketPairWindow
public PacketPairWindow(int size)
- construct a new packet pair window with the given size
- Parameters:
size -
computeMedianTimeInterval
public double computeMedianTimeInterval()
- compute the median packet pair interval of the last
16 packet pair intervals (PI).
(see specification section 6.2, page 12)
- Returns:
- time interval in microseconds
getEstimatedLinkCapacity
public long getEstimatedLinkCapacity()
- compute the estimated linK capacity using the values in
packet pair window
- Returns:
- number of packets per second
Copyright © 2013 LittleShoot. All Rights Reserved.