protected long sendAcknowledgment(long ackNumber) { Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); //set the estimate link capacity estimateLinkCapacity = packetPairWindow.getEstimatedLinkCapacity(); acknowledgmentPkt.EstimatedLinkCapacity = (estimateLinkCapacity); //set the packet arrival rate packetArrivalSpeed = packetHistoryWindow.getPacketArrivalSpeed(); acknowledgmentPkt.PacketReceiveRate = (packetArrivalSpeed); endpoint.DoSend(acknowledgmentPkt); statistics.incNumberOfACKSent(); statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); return(acknowledgmentPkt.AckSequenceNumber); }
protected long sendAcknowledgment(long ackNumber) { try { Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); //set the estimate link capacity estimateLinkCapacity = packetPairWindow.getEstimatedLinkCapacity(); acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); //set the packet arrival rate packetArrivalSpeed = packetHistoryWindow.getPacketArrivalSpeed(); acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); endpoint.doSend(acknowledgmentPkt); statistics.incNumberOfACKSent(); statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); return(acknowledgmentPkt.getAckSequenceNumber()); } catch (Exception exc) { Log.Write(this.ToString(), exc); return(0); } }