Commit Graph

60 Commits

Author SHA1 Message Date
Lucas Clemente
c12a12518e run gofmt -s on tests 2016-05-15 14:42:34 +02:00
Marten Seemann
540941117e cosmetic changes in tests 2016-05-15 13:08:56 +07:00
Marten Seemann
c0c7be16e3 add method to get ACK from ReceivedPacketHandler without dequeueing it 2016-05-13 15:55:56 +07:00
Marten Seemann
f8dc78967a add method to ask SendPacketHandler if any retransmissions queued 2016-05-13 12:56:58 +07:00
Marten Seemann
3683763dc0 send DelayTime in ACK frames
fixes #81
2016-05-12 17:43:48 +07:00
Marten Seemann
e782f28b2b save timestamp when a packet arrives in ReceivedPacketHandler
work towards #10, #81
2016-05-12 15:12:51 +07:00
Marten Seemann
33c0f3a5df set LeastUnackedDelta length in StopWaitingFrame
fixes #79
2016-05-12 13:05:42 +07:00
Marten Seemann
7169584ff9 implement sending of shortened packet numbers 2016-05-10 17:25:52 +07:00
Lucas Clemente
c3f51af850 reset retransmissionTimeout after sentPacketHandler tests 2016-05-08 18:29:08 +02:00
Marten Seemann
dbcf5b8cce send retransmission in the right order
fixes #62
2016-05-08 23:04:41 +07:00
Marten Seemann
833475a2ed ensure that StopWaitingManager only gives StopWaitingFrames with increasing LeastUnacked
fixes #49
2016-05-08 22:37:25 +07:00
Lucas Clemente
16b12328fc make sent packet handler return acked and lost packets for congestion 2016-05-07 00:46:00 +02:00
Lucas Clemente
02ab3480ff keep bytesInFlight as protocol.ByteCount 2016-05-06 12:59:32 +02:00
Marten Seemann
08d96d2a69 calculate NACK ranges in the correct order expected by the ACK frame writer
fixes #43
2016-05-03 18:31:02 +07:00
Marten Seemann
d1a3d14cf1 fix typo in EntropyAccumulator function 2016-05-02 16:36:48 +07:00
Marten Seemann
ad467ade58 fix several linter warnings and misspellings 2016-05-02 16:33:32 +07:00
Marten Seemann
733873fa5e correctly treat LeastUnacked value in a StopWaitingFrame 2016-04-30 19:00:01 +07:00
Marten Seemann
74f7576391 implement a StopWaitingManager
fixes #30
2016-04-29 16:58:30 +07:00
Lucas Clemente
1535663fc5 add bytes-in-flight calculation to SentPacketHandler 2016-04-28 22:30:03 +02:00
Lucas Clemente
ac1affb940 make SentPacketHandler compute the delta between sent and ack time 2016-04-28 18:52:12 +02:00
Marten Seemann
6eeccfd123 retransmit lost packets, send StopWaiting frames 2016-04-27 18:56:21 +07:00
Marten Seemann
2056960e07 only delete a Packet from history in SentPacketHandler once it has been ACKed 2016-04-27 17:19:54 +07:00
Marten Seemann
2c95141ee1 add Len() and ContainsPacketNumber() to NackRange 2016-04-27 16:04:50 +07:00
Marten Seemann
160db13bdb close the connection on an MapAccess error in SentPacketHandler 2016-04-27 11:34:35 +07:00
Marten Seemann
e27d3ea3f8 ReceivedPacketHandler only generates ACKs if packets were received after the last ACK 2016-04-26 22:38:10 +07:00
Marten Seemann
4659bf7acb store the payload of sent packets as a slice of Frames 2016-04-26 20:35:30 +07:00
Marten Seemann
7e9f185f79 close connection if the entropy of a received ACK is incorrect 2016-04-26 11:17:16 +07:00
Marten Seemann
c8f48fe5bc ignore duplicate ACK and out-of-order ACK errors in Session 2016-04-26 10:48:14 +07:00
Marten Seemann
b4fae00880 rename IncomingPacketAckHandler to ReceivedPacketHandler 2016-04-26 10:17:18 +07:00
Marten Seemann
0088636798 rename OutgoingPacketAckHandler to SentPacketHandler 2016-04-26 10:07:00 +07:00
Marten Seemann
a79f7c4dc6 rewrite of OutgoingPacketAckHandler 2016-04-25 22:43:42 +07:00
Marten Seemann
c6b69e632e add Substract method for EntropyAccumulator 2016-04-25 19:04:15 +07:00
Marten Seemann
a3ecf2ee69 more tests for LargestObserved in OutgoingPacketAckHandler 2016-04-25 18:07:40 +07:00
Lucas Clemente
a1d0056867 implement handling of STOP_WAITING frames for incoming packets 2016-04-25 12:48:09 +02:00
Marten Seemann
4be2ef710c actually store LargestObserved in OutgoingPacketAckHandler 2016-04-25 17:09:51 +07:00
Marten Seemann
bf7875426a better test structurve for OutgoingPacketAckHandler 2016-04-25 12:17:49 +07:00
Marten Seemann
c9b01a3785 implemenet OutgoingPacketAckHandler.DequeuePacketForRetransmission(), fix minor error 2016-04-25 11:45:29 +07:00
Marten Seemann
7467e7ebff OutgoingPacketAckHandler queues packets for retransmission 2016-04-24 20:28:37 +07:00
Marten Seemann
50d38eac39 fix bug in OutgoingPacketAckHandler entropy calculation for simple ACKs 2016-04-23 10:57:44 +07:00
Marten Seemann
063cd4a7bd calculate entropy when there are NACK ranges 2016-04-22 18:35:19 +07:00
Marten Seemann
3e5f43f45a calculate the Entropy byte for the highest in order received packet 2016-04-22 17:50:04 +07:00
Marten Seemann
aad1fd2ee7 keep track of highest in order received packet number 2016-04-22 17:34:38 +07:00
Marten Seemann
62a844d326 store NackRanges instead of pointers to NackRanges 2016-04-22 17:27:53 +07:00
Marten Seemann
6caf1f74e3 reject duplicate packets and packets with packet number 0 2016-04-22 16:26:12 +07:00
Marten Seemann
07419c25c5 use old AckHandler to fulfil IncomingPacketAckHandler interface 2016-04-22 15:05:55 +07:00
Marten Seemann
4eb088caa6 increase missingReports counter for NACKed packets 2016-04-22 13:15:55 +07:00
Marten Seemann
0fb7038747 calculate expected entropy in seperate function for ReceivedAck 2016-04-22 11:55:44 +07:00
Marten Seemann
bda03de882 ack NACK handling 2016-04-21 23:01:39 +07:00
Marten Seemann
e5559d37d3 store the end of the NACK range instead of its length 2016-04-21 18:42:52 +07:00
Marten Seemann
88cd62e7fe add missing test for Entropy calculation 2016-04-21 16:51:07 +07:00