smoltcp icon indicating copy to clipboard operation
smoltcp copied to clipboard

feat(congestion control): add CongestionController trait and example impl

Open ytakano opened this issue 6 months ago • 9 comments

Add CongestionController trait for congestion controllers of TCP.

By default, this PR uses NoControl, which do not control congestion, and the PR does not affect conventional behavior.

To use Cubic or Reno congestion controllers, socket-tcp-cubic or socket-tcp-reno features must be set or tcp::Socket::new_with_cc() must be used.

Users can implement custom congestion controllers by using CongestionController trait and tcp::Socket::new_with_cc().

Cubic or Reno can be tested as follows.

$ cargo test --features socket-tcp-cubic
$ cargo test --features socket-tcp-reno

ytakano avatar Feb 18 '24 11:02 ytakano