Safe Haskell | None |
---|---|
Language | Haskell2010 |
Partial implementation of the Magic Wormhole file transfer protocol.
Once a connection has been made between peers (see withEncryptedConnection
),
you can send an Offer
to share a simple text message.
Synopsis
- data Offer
- data DirectoryMode = ZipFileDeflated
Documentation
An offer made by a sender as part of the Magic Wormhole file transfer protocol.
Currently only supports sending simple text messages. A full version would also support sending files and directories.
Message Text | A simple text message. |
File FilePath FileOffset | Offer a File with filename and size. |
Directory | Offer a Directory |
|
for tests
data DirectoryMode Source #
Textual representation of the format in which the directory tree is encoded
Instances
Eq DirectoryMode Source # | |
Defined in MagicWormhole.Internal.FileTransfer (==) :: DirectoryMode -> DirectoryMode -> Bool # (/=) :: DirectoryMode -> DirectoryMode -> Bool # | |
Show DirectoryMode Source # | |
Defined in MagicWormhole.Internal.FileTransfer showsPrec :: Int -> DirectoryMode -> ShowS # show :: DirectoryMode -> String # showList :: [DirectoryMode] -> ShowS # | |
ToJSON DirectoryMode Source # | |
Defined in MagicWormhole.Internal.FileTransfer toJSON :: DirectoryMode -> Value # toEncoding :: DirectoryMode -> Encoding # toJSONList :: [DirectoryMode] -> Value # toEncodingList :: [DirectoryMode] -> Encoding # | |
FromJSON DirectoryMode Source # | |
Defined in MagicWormhole.Internal.FileTransfer parseJSON :: Value -> Parser DirectoryMode # parseJSONList :: Value -> Parser [DirectoryMode] # |