diff options
author | joe <joe@jerkface.net> | 2017-11-24 19:22:31 -0500 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-11-24 19:22:31 -0500 |
commit | e71e49c604277c66dfe448e2cfc13dbbcac8f6dd (patch) | |
tree | ba2f94f8a40adb5521b243e6898103ee0146973f /src/Network/Tox/Onion/Transport.hs | |
parent | 3e33a6204b5fc55475bc0bd03602fd8a4930ac7c (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.hs | 11 |
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 | ||
808 | instance 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 | |||
808 | data AnnouncedRendezvous = AnnouncedRendezvous | 819 | data AnnouncedRendezvous = AnnouncedRendezvous |
809 | { remoteUserKey :: PublicKey | 820 | { remoteUserKey :: PublicKey |
810 | , rendezvous :: Rendezvous | 821 | , rendezvous :: Rendezvous |