pub fn smoltcp_poll_loop(
shared: Arc<SharedState>,
config: PollLoopConfig,
network_policy: NetworkPolicy,
dns_config: DnsConfig,
tls_state: Option<Arc<TlsState>>,
published_ports: Vec<PublishedPort>,
max_connections: Option<usize>,
tokio_handle: Handle,
)Expand description
Main smoltcp poll loop. Runs on a dedicated OS thread.
Processes guest frames with pre-inspection, drives smoltcp’s TCP/IP
stack, and sleeps via poll(2) between events.
§Phases per iteration
- Drain guest frames — pop from
tx_ring, classify, pre-inspect. - smoltcp egress + maintenance — transmit queued packets, run timers.
- Service connections — relay data between smoltcp sockets and proxy tasks (added by later tasks).
- Sleep —
poll(2)ontx_wake+proxy_wakepipes with smoltcp’s requested timeout.