Skip to main content

serve

Function serve 

Source
pub fn serve<F>(
    endpoint: IrohEndpoint,
    options: ServeOptions,
    on_request: F,
) -> ServeHandle
where F: Fn(RequestPayload) + Send + Sync + 'static,
Expand description

Start the serve accept loop.

This is the 3-argument form for backward compatibility. Use serve_with_events to also receive peer connect/disconnect callbacks.