Skip to main content

join

Function join 

Source
pub fn join<T: Transport>(
    transport: &mut T,
    request: &JoinRequest,
    code: &PairingCode,
    rng: &mut impl CryptoRng,
) -> Result<Grant, SyncError>
Expand description

Pairs with the sponsor at the other end of transport, as the joiner, with the code the person typed, and returns what the sponsor granted. The joiner then makes its library and says so with joined.

ยงErrors

Returns SyncError::WrongCode if the code did not match, on either side, and other errors if the connection fails or the sponsor breaks the protocol.