summaryrefslogtreecommitdiff
path: root/src/Network/Tox/Onion/Transport.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-11-24 19:22:31 -0500
committerjoe <joe@jerkface.net>2017-11-24 19:22:31 -0500
commite71e49c604277c66dfe448e2cfc13dbbcac8f6dd (patch)
treeba2f94f8a40adb5521b243e6898103ee0146973f /src/Network/Tox/Onion/Transport.hs
parent3e33a6204b5fc55475bc0bd03602fd8a4930ac7c (diff)
Made "dhtkey" and "friend" automated with "a" command.
Diffstat (limited to 'src/Network/Tox/Onion/Transport.hs')
-rw-r--r--src/Network/Tox/Onion/Transport.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Network/Tox/Onion/Transport.hs b/src/Network/Tox/Onion/Transport.hs
index 5c4544ca..23fd369b 100644
--- a/src/Network/Tox/Onion/Transport.hs
+++ b/src/Network/Tox/Onion/Transport.hs
@@ -805,6 +805,17 @@ instance Show Rendezvous where
805 . (':' :) 805 . (':' :)
806 . showsPrec d ni 806 . showsPrec d ni
807 807
808instance Read Rendezvous where
809 readsPrec d = RP.readP_to_S $ do
810 rkstr <- RP.munch (/=':')
811 RP.char ':'
812 nistr <- RP.munch (const True)
813 return Rendezvous
814 { rendezvousKey = id2key $ read rkstr
815 , rendezvousNode = read nistr
816 }
817
818
808data AnnouncedRendezvous = AnnouncedRendezvous 819data AnnouncedRendezvous = AnnouncedRendezvous
809 { remoteUserKey :: PublicKey 820 { remoteUserKey :: PublicKey
810 , rendezvous :: Rendezvous 821 , rendezvous :: Rendezvous