Skip to main content

serve_cloudflared

Function serve_cloudflared 

Source
pub async fn serve_cloudflared<S, H>(
    stream: &mut S,
    handler: &H,
) -> Result<(), RpcError>
Expand description

Serves the edge’s calls on an RPC stream until the stream ends.

Answers the bootstrap with a senderHosted capability (mirroring capnp-go’s main-interface handshake), dispatches updateConfiguration to CloudflaredHandler::update_configuration, and answers the UDP session methods from the handler. The edge sends finish and release messages between calls; those need no reply.