diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-11-17 17:19:04 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-11-17 18:30:50 -0400 |
commit | 49da2d5efdad0038f22bc5e3bc50cf117849d472 (patch) | |
tree | a5b5bb140c712f2d49e6ff5f3488fcdd5539ac60 /Remote/External | |
parent | 6a176acc6e40a68740dab363eac4bdd324a77eb8 (diff) |
implementation of peer-to-peer protocol
For use with tor hidden services, and perhaps other transports later.
Based on Utility.SimpleProtocol, it's a line-based protocol,
interspersed with transfers of bytestrings of a specified size.
Implementation of the local and remote sides of the protocol is done
using a free monad. This lets monadic code be included here, without
tying it to any particular way to get bytes peer-to-peer.
This adds a dependency on the haskell package "free", although that
was probably pulled in transitively from other dependencies already.
This commit was sponsored by Jeff Goeke-Smith on Patreon.
Diffstat (limited to 'Remote/External')
-rw-r--r-- | Remote/External/Types.hs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/Remote/External/Types.hs b/Remote/External/Types.hs index 2306989bb..ef8724ee7 100644 --- a/Remote/External/Types.hs +++ b/Remote/External/Types.hs @@ -250,14 +250,6 @@ instance Proto.Serializable Direction where deserialize "RETRIEVE" = Just Download deserialize _ = Nothing -instance Proto.Serializable Key where - serialize = key2file - deserialize = file2key - -instance Proto.Serializable [Char] where - serialize = id - deserialize = Just - instance Proto.Serializable ProtocolVersion where serialize = show deserialize = readish |