Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- sendFile :: EncryptedConnection -> RelayEndpoint -> AppID -> FilePath -> IO (Either Error ())
- receiveFile :: EncryptedConnection -> RelayEndpoint -> AppID -> TransitMsg -> IO (Either Error ())
- data MessageType
Documentation
sendFile :: EncryptedConnection -> RelayEndpoint -> AppID -> FilePath -> IO (Either Error ()) Source #
Given the magic-wormhole session, appid, password, 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.
receiveFile :: EncryptedConnection -> RelayEndpoint -> AppID -> TransitMsg -> IO (Either Error ()) Source #
Receive a file or directory via the established MagicWormhole connection
data MessageType Source #
Transfer type
Instances
Eq MessageType Source # | |
Defined in Transit.Internal.FileTransfer (==) :: MessageType -> MessageType -> Bool (/=) :: MessageType -> MessageType -> Bool | |
Show MessageType Source # | |
Defined in Transit.Internal.FileTransfer showsPrec :: Int -> MessageType -> ShowS show :: MessageType -> String showList :: [MessageType] -> ShowS |