diff options
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r-- | examples/dhtd.hs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs index 36b8e294..3fb1c641 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs | |||
@@ -734,10 +734,15 @@ main = do | |||
734 | 734 | ||
735 | let toxDHT bkts = DHT | 735 | let toxDHT bkts = DHT |
736 | { dhtBuckets = bkts (Tox.toxRouting tox) | 736 | { dhtBuckets = bkts (Tox.toxRouting tox) |
737 | , dhtPing = Map.singleton "ping" $ DHTPing | 737 | , dhtPing = Map.fromList |
738 | { pingQuery = fmap (bool Nothing (Just ())) . Tox.ping (Tox.toxDHT tox) | 738 | [ ("ping", DHTPing |
739 | , pingShowResult = show | 739 | { pingQuery = fmap (bool Nothing (Just ())) . Tox.ping (Tox.toxDHT tox) |
740 | } | 740 | , pingShowResult = show |
741 | }) | ||
742 | , ("cookie", DHTPing | ||
743 | { pingQuery = Tox.cookieRequest (Tox.toxCryptoKeys tox) (Tox.toxDHT tox) | ||
744 | , pingShowResult = show | ||
745 | })] | ||
741 | , dhtQuery = Map.fromList | 746 | , dhtQuery = Map.fromList |
742 | [ ("node", DHTQuery (Tox.nodeSearch $ Tox.toxDHT tox) | 747 | [ ("node", DHTQuery (Tox.nodeSearch $ Tox.toxDHT tox) |
743 | (\ni -> fmap Tox.unwrapNodes | 748 | (\ni -> fmap Tox.unwrapNodes |