summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2018-05-28 18:54:23 -0400
committerjoe <joe@jerkface.net>2018-05-28 18:54:23 -0400
commit44bd81d013eea9dd087a8fbfc92694c33f634d0e (patch)
treeb61ff3025520525db2a4ec893e75364c3bbe2a4a /examples
parent97175350f538c0164eed85d21f7bc239304d1ef1 (diff)
Comments documenting tox-related "a" methods.
Diffstat (limited to 'examples')
-rw-r--r--examples/dhtd.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index f713b926..091b1565 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -1432,6 +1432,9 @@ main = runResourceT $ liftBaseWith $ \resT -> do
1432 , dhtSearches = toxSearches 1432 , dhtSearches = toxSearches
1433 , dhtFallbackNodes = return [] 1433 , dhtFallbackNodes = return []
1434 , dhtAnnouncables = Map.fromList 1434 , dhtAnnouncables = Map.fromList
1435 -- To announce your own tox OrjBG... identity is online:
1436 --
1437 -- > a +toxid OrjBG.GyWuQhGc1pb0KssgmYAocohFh35Vx8mREC9Nu
1435 [ ("toxid", DHTAnnouncable { announceSendData = Right (toxAnnounceSendData tox) 1438 [ ("toxid", DHTAnnouncable { announceSendData = Right (toxAnnounceSendData tox)
1436 , announceParseAddress = readEither 1439 , announceParseAddress = readEither
1437 , announceParseToken = const $ readEither 1440 , announceParseToken = const $ readEither
@@ -1459,6 +1462,13 @@ main = runResourceT $ liftBaseWith $ \resT -> do
1459 -- r = Rendezvous 1462 -- r = Rendezvous
1460 -- tok = Nonce32 1463 -- tok = Nonce32
1461 -- dta = PublicKey{-them-} 1464 -- dta = PublicKey{-them-}
1465 --
1466 -- Using k-selected identity, to share your dht
1467 -- key with remote tox user
1468 -- "KWoEx1XQHrluIoW.3nK6BFb6XCebKWr3nDDt3V7CcoJ"
1469 -- ...
1470 --
1471 -- > a +dhtkey KWoEx1XQHrluIoW.3nK6BFb6XCebKWr3nDDt3V7CcoJ
1462 , ("dhtkey", DHTAnnouncable { announceSendData = Left ("toxid", readEither, \me them addr -> do 1472 , ("dhtkey", DHTAnnouncable { announceSendData = Left ("toxid", readEither, \me them addr -> do
1463 dkey <- Tox.getContactInfo tox 1473 dkey <- Tox.getContactInfo tox
1464 sendMessage 1474 sendMessage
@@ -1497,6 +1507,12 @@ main = runResourceT $ liftBaseWith $ \resT -> do
1497 -- r = Rendezvous 1507 -- r = Rendezvous
1498 -- tok = Nonce32 1508 -- tok = Nonce32
1499 -- dta = (NoSpamId{-them-},String) 1509 -- dta = (NoSpamId{-them-},String)
1510 --
1511 -- Using k-selected identity, to send a
1512 -- friend-request to the JID $TESTZ300@OrjBG...:
1513 --
1514 -- > a +friend $TESTZ300@OrjBG.GyWuQhGc1pb0KssgmYAocohFh35Vx8mREC9Nu.tox Hey, add me!
1515 --
1500 , ("friend", DHTAnnouncable { announceSendData = Left ("toxid", readEither, \me them0 addr -> do 1516 , ("friend", DHTAnnouncable { announceSendData = Left ("toxid", readEither, \me them0 addr -> do
1501 let (Tox.NoSpamId sum them,txt) = them0 1517 let (Tox.NoSpamId sum them,txt) = them0
1502 Tox.NoSpam nospam _ = sum 1518 Tox.NoSpam nospam _ = sum