udt.packets
Class Acknowledgement

java.lang.Object
  extended by udt.packets.ControlPacket
      extended by udt.packets.Acknowledgement
All Implemented Interfaces:
Comparable<UDTPacket>, UDTPacket

public class Acknowledgement
extends ControlPacket

Acknowledgement is sent by the UDTReceiver to the UDTSender to acknowledge receipt of packets


Nested Class Summary
 
Nested classes/interfaces inherited from class udt.packets.ControlPacket
ControlPacket.ControlPacketType
 
Field Summary
 
Fields inherited from class udt.packets.ControlPacket
ackSequenceNumber, controlInformation, controlPacketType, destinationID, messageNumber, timeStamp
 
Constructor Summary
Acknowledgement()
           
Acknowledgement(byte[] controlInformation)
           
 
Method Summary
 byte[] encodeControlInformation()
          this method builds the control information from the control parameters
 boolean equals(Object obj)
           
 long getAckNumber()
          get the ack number (the number up to which all packets have been received (excluding))
 long getBufferSize()
           
 long getEstimatedLinkCapacity()
           
 long getPacketReceiveRate()
           
 long getRoundTripTime()
          get the round trip time (microseconds)
 long getRoundTripTimeVar()
           
 void setBufferSize(long bufferSiZe)
           
 void setEstimatedLinkCapacity(long estimatedLinkCapacity)
           
 void setNexttoPrevPktSeqNO(long nexttoPrevPktSeqNO)
          set the ack number (the number up to which all packets have been received (excluding))
 void setPacketReceiveRate(long packetReceiveRate)
           
 void setRoundTripTime(long RoundTripTime)
          set the round trip time (in microseconds)
 void setRoundTripTimeVar(long roundTripTimeVar)
          set the variance of the round trip time (in microseconds)
 
Methods inherited from class udt.packets.ControlPacket
compareTo, forSender, getAckSequenceNumber, getControlPacketType, getDestinationID, getEncoded, getHeader, getMessageNumber, getPacketSequenceNumber, getSession, getTimeStamp, isConnectionHandshake, isControlPacket, setAckSequenceNumber, setDestinationID, setMessageNumber, setSession, setTimeStamp
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Acknowledgement

public Acknowledgement()

Acknowledgement

public Acknowledgement(byte[] controlInformation)
Method Detail

getAckNumber

public long getAckNumber()
get the ack number (the number up to which all packets have been received (excluding))

Returns:

setNexttoPrevPktSeqNO

public void setNexttoPrevPktSeqNO(long nexttoPrevPktSeqNO)
set the ack number (the number up to which all packets have been received (excluding))

Parameters:
nexttoPrevPktSeqNO -

getRoundTripTime

public long getRoundTripTime()
get the round trip time (microseconds)

Returns:

setRoundTripTime

public void setRoundTripTime(long RoundTripTime)
set the round trip time (in microseconds)

Parameters:
RoundTripTime -

setRoundTripTimeVar

public void setRoundTripTimeVar(long roundTripTimeVar)
set the variance of the round trip time (in microseconds)

Parameters:
RoundTripTime -

getRoundTripTimeVar

public long getRoundTripTimeVar()

getBufferSize

public long getBufferSize()

setBufferSize

public void setBufferSize(long bufferSiZe)

getPacketReceiveRate

public long getPacketReceiveRate()

setPacketReceiveRate

public void setPacketReceiveRate(long packetReceiveRate)

getEstimatedLinkCapacity

public long getEstimatedLinkCapacity()

setEstimatedLinkCapacity

public void setEstimatedLinkCapacity(long estimatedLinkCapacity)

encodeControlInformation

public byte[] encodeControlInformation()
Description copied from class: ControlPacket
this method builds the control information from the control parameters

Specified by:
encodeControlInformation in class ControlPacket
Returns:

equals

public boolean equals(Object obj)
Overrides:
equals in class ControlPacket


Copyright © 2013 LittleShoot. All Rights Reserved.