Function gdhttp::start

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

Start listening for connections synchronously. 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