Skip to main content

host

Function host 

Source
pub async fn host(
    dm: &AuthClient,
    key: &DeviceKey,
    campaign: &Campaign,
    server_key: PublicKey,
    invitation: &Invitation,
    approve: impl FnOnce(&JoinRequest) -> bool,
) -> Result<Device, PairError>
Expand description

The host’s side: waits for someone to join with invitation’s code, asks approve about them, and if approved admits them to the campaign. dm must be logged in as the DM device key.