Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
Magic Wormhole transit app environment
App Monad Transformer that reads the configuration from Env
, runs
a computation over the IO Monad and returns either the value a
or Error
A file transfer application that takes an Env
and depending on the
config options, either sends or receives a file, directory or a text
message from the peer.
send :: Session -> Text -> MessageType -> App () Source #
Given the magic-wormhole session, appid, pass code, a function to print a helpful message
on the command the receiver needs to type (simplest would be just a putStrLn
) and the
path on the disk of the sender of the file that needs to be sent, sendFile
sends it via
the wormhole securely. The receiver, on successfully receiving the file, would compute
a sha256 sum of the encrypted file and sends it across to the sender, along with an
acknowledgement, which the sender can verify.