magic-wormhole-0.3.4: Interact with Magic Wormhole

Safe HaskellNone
LanguageHaskell2010

MagicWormhole.Internal.Versions

Description

Once a shared SessionKey has been negotiated, the peers need to confirm that they have the same key. They do this with versionExchange.

Synopsis

Documentation

versionExchange Source #

Arguments

:: Connection

A connection to a peer

-> SessionKey

A shared session key. Obtain this via pakeExchange.

-> IO Versions

Shared version information

Exchange version information with a Magic Wormhole peer.

Can throw an Error if something goes wrong.

data Versions Source #

Information about the versions supported by this Magic Wormhole client.

There are no extant Magic Wormhole implementations that send any meaningful information in their versions message, so this is just a single-valued type.

Constructors

Versions 

data VersionsError Source #

An error occurred during versionExchange.

Constructors

ParseError String

We could not interpret the other side's version information

VersionMismatch

The other side sent us version information, but it does not match ours, so we cannot proceed.