pub fn start_multithreaded(
    addr: &str,
    callback: fn(request: HttpRequest) -> HttpResponse
) -> Result<(), &str>
Expand description

Start listening for connections with multithreading enabled. First argument is an address with port (ex. 0.0.0.0:8080). Second one is callback function that will be called when request from client has been received. You can then process it and return your response. In this variant, callback is dispatched with usage of thread::spawn, which can change app performance in some cases.