Skip to main content

start

Function start 

Source
pub fn start(
    lib: Shared,
    ports: impl IntoIterator<Item = u16>,
    options: Options,
    on_request: impl Fn() + Send + Sync + 'static,
) -> Result<Handle>
Expand description

Starts serving on the first free port of ports, calling on_request after each handled request (for example to repaint a UI). Port 0 asks the system for a free port.