Expand description
PROXY listener.
Listens for client connections on the configured listen: port
and spawns a CLIENT FSM per accepted socket. Proxy owns a
tokio::net::TcpListener and a per-listener Dispatcher
reference; calling Proxy::run enters an accept-loop that
drives a fresh tokio::spawn for every incoming socket.
§Examples
use dynomite::net::{NoopDispatcher, Proxy};
use std::sync::Arc;
let addr: std::net::SocketAddr = "127.0.0.1:0".parse().unwrap();
let proxy = Proxy::bind(addr, Arc::new(NoopDispatcher)).unwrap();
let _handle = proxy.local_addr();Structs§
- Proxy
- PROXY listener.