Commit Graph

15 Commits

Author SHA1 Message Date
KonradStaniec b56e19a590
Improve handling of timestamps (#446)
* Improve handling of timestamps
2021-12-10 16:28:00 +01:00
Kim De Mey 41d2d3c991
Utp top level raises & some clean-up (#445)
* Add few missing top level raises Defect in uTP

- Add top level {.push raises: [Defect].}
- remove some local raises, including some unneeded
CatchableErrors.
- Don't export messageHandler (avoiding annoying naming collisions)
- export utp_router as those connection callbacks are in the API

* Add some missing copyright clauses

* Some ident and max line length cleanup

* Rename utp_discv5_protocol.nim to be more consistent
2021-12-10 11:12:24 +01:00
KonradStaniec 09959d2a3f
Update timestamp and ackNr on packet resend (#444)
* Update timestamp and ackNr on packet resend
2021-12-10 10:18:00 +01:00
KonradStaniec b4066a5688
Ledbat congestion control (#443)
* Return delay to remote peer

* Initial ledbat window calculation

* Add tests for window grow and decay

* Add delay histograms

* Add calculation of clock drift
2021-12-09 10:52:21 +01:00
KonradStaniec e7bc10ab00
Add config for max snd buffer size (#440)
* Add config for max snd buffer size
2021-12-02 16:51:44 +01:00
KonradStaniec 3c8915cae1
Track send buffer and properly handle back pressoure when window is to small to process data (#437)
* Add separate datastructure to keep track of window

* Asynchronously block write until until new space in snd buffer

* Introduce write loop

* Properly handle write cancellation

* Proper handling of sending fin packet

* Reset remote window after configured amount of time
2021-12-02 15:46:18 +01:00
KonradStaniec 139c6fa2a8
Track current bytes in flight (#434) 2021-11-24 17:49:13 +01:00
KonradStaniec ce296ff76e
Make initial state of socket configurable (#428)
* Make initial state of socket configurable
2021-11-19 11:36:46 +01:00
KonradStaniec d5e5ec9f90
Add possibility to connect with requested conneciton id (#425)
* Improve error handling when initiating connection

* Add api to connect with requested id

* Add callback to allow only specific incoming peers
2021-11-18 10:05:56 +01:00
KonradStaniec 73d9bf4c80
Add ackNr validation (#424) 2021-11-15 11:32:00 +01:00
KonradStaniec 8139aae346
Advertise correct rcv buffer size (#423)
* Advertise correct rcv buffer size
2021-11-12 10:58:49 +01:00
KonradStaniec b671f6c901
Handling of fin packet (#421)
* Handling of connection finalization by sending and receiving FIN packets
2021-11-09 15:29:59 +01:00
KonradStaniec 7a113ffa48
Add handling of reset packet (#420)
* Add handling of reset packet
2021-11-05 09:41:41 +01:00
KonradStaniec d4cc42241d
Add handling of out of order packets (#418)
* Add handling of out of order packets
2021-11-04 07:38:46 +01:00
KonradStaniec 34bac6e703
Utp code cleanup (#417)
* Refactor tests and move socket to separate file

* Move sockets handling to separate class

* Abstract over underlying transport

* Fix bug with receiving duplicated SYN packet

* Fix race condition in connect
2021-10-28 11:41:43 +02:00