smoltcp
smoltcp copied to clipboard
feat(congestion control): add CongestionController trait and example impl
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