Safe Haskell | None |
---|---|
Language | Haskell2010 |
Once a shared SessionKey
has been negotiated, the peers
need to confirm that they have the same key. They do this with
versionExchange
.
Synopsis
- versionExchange :: Connection -> SessionKey -> IO Versions
- data Versions = Versions
- data VersionsError
Documentation
:: Connection | A connection to a peer |
-> SessionKey | A shared session key. Obtain this via |
-> IO Versions | Shared version information |
Exchange version information with a Magic Wormhole peer.
Can throw an Error
if something goes wrong.
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.
data VersionsError Source #
An error occurred during versionExchange
.
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. |
Instances
Eq VersionsError Source # | |
Defined in MagicWormhole.Internal.Versions (==) :: VersionsError -> VersionsError -> Bool # (/=) :: VersionsError -> VersionsError -> Bool # | |
Show VersionsError Source # | |
Defined in MagicWormhole.Internal.Versions showsPrec :: Int -> VersionsError -> ShowS # show :: VersionsError -> String # showList :: [VersionsError] -> ShowS # | |
Exception VersionsError Source # | |
Defined in MagicWormhole.Internal.Versions |