Skip to main content

librqbit_utp/
lib.rs

1// RTT, RTO, congestion
2// Recent RFCs that we might try to implement exactly to make everyting super explicit
3// RFC 9293 https://datatracker.ietf.org/doc/html/rfc9293 (TCP) (2022, standard)
4// RFC 6298 https://datatracker.ietf.org/doc/html/rfc6298 (2011, draft) - RTO calculation, references RTT calculation
5// RFC 5681 https://datatracker.ietf.org/doc/html/rfc5681 (2009, draft) - congestion control, fast retransmit, fast recovery
6//
7// rfc8985 (draft, 2021) - RACK algorithm
8
9// TODO: LEDBAT congestion control
10
11#[macro_use]
12mod macros;
13mod congestion;
14mod constants;
15#[cfg(test)]
16mod e2e_tests;
17mod error;
18mod message;
19mod metrics;
20pub mod mtu;
21pub mod raw;
22mod recovery;
23mod rtte;
24mod seq_nr;
25mod socket;
26mod spawn_utils;
27mod stream;
28mod stream_dispatch;
29mod stream_rx;
30mod stream_tx;
31mod stream_tx_segments;
32#[cfg(test)]
33mod test_util;
34mod traits;
35mod utils;
36
37pub use error::{Error, Result};
38pub use librqbit_dualstack_sockets::BindDevice;
39pub use socket::{
40    CongestionConfig, CongestionControllerKind, SocketOpts, UtpSocket, UtpSocketUdp,
41    UtpSocketUdpOpts,
42};
43pub use stream::UtpStream;
44pub use stream_rx::UtpStreamReadHalf;
45pub use stream_tx::UtpStreamWriteHalf;
46pub use traits::Transport;
47
48type Payload = Vec<u8>;