1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Virtual TCP engine.
//!
//! Pure-Rust port of the Go `vtcp` subpackage: a synchronous TCP state machine
//! operating on raw TCP segments. It is IP-agnostic and Ethernet-agnostic —
//! callers feed inbound segments via [`Conn::handle_segment`] and transmit
//! whatever the connection returns. A periodic [`Conn::tick`] drives RTO,
//! persist, keepalive, and TIME-WAIT timers; there is no background thread.
//!
//! Supported RFCs:
//! - RFC 9293 (TCP, rolled-up): state machine, basic segment processing.
//! - RFC 6298: RTO smoothing + Karn's algorithm.
//! - RFC 5681: NewReno congestion control (slow start, congestion avoidance,
//! fast retransmit/recovery).
//! - RFC 3649: HighSpeed TCP (default controller).
//! - RFC 7323: window scaling, timestamps (PAWS).
//! - RFC 2018: SACK.
//! - SYN-cookie engine for stateless half-open completion.
//!
//! What was intentionally not ported in this initial cut:
//! - `// TODO(vtcp)`: blocking [`Conn::read`]/[`Conn::write`] with deadlines —
//! the port is non-blocking; callers compose their own waiting strategy.
//! - `// TODO(vtcp)`: Listener / accept-queue type (the Go upstream exposes
//! one; here we expose [`Conn::accept_syn`] and [`syncookie::SynCookies`]
//! so callers can build the listener that suits their loop).
//! - `// TODO(vtcp)`: re-entrancy "trampoline" for synchronous mutual recursion
//! — Rust's borrow checker forces callers to drain `take_outgoing()`
//! themselves, sidestepping the issue.
pub use ;
pub use ;
pub use ;
pub use RecvBuf;
pub use ;
pub use ;
pub use SendBuf;
pub use ;
pub use SynCookies;