summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/testcookie.hs14
1 files changed, 13 insertions, 1 deletions
diff --git a/examples/testcookie.hs b/examples/testcookie.hs
index 5f5d4e83..4302ad35 100644
--- a/examples/testcookie.hs
+++ b/examples/testcookie.hs
@@ -11,6 +11,9 @@ import Network.Tox.DHT.Transport (Cookie(..))
11 11
12import Data.Serialize as S 12import Data.Serialize as S
13 13
14import Network.Tox.Crypto.Transport
15import Data.Word
16
14-- 17--
15-- Some relevant functions: 18-- Some relevant functions:
16-- 19--
@@ -50,4 +53,13 @@ main = do
50 exitFailure 53 exitFailure
51 Right n24' -> do 54 Right n24' -> do
52 putStrLn $ "n24' = " ++ show n24' 55 putStrLn $ "n24' = " ++ show n24'
53 if n24' == n24 then exitSuccess else exitFailure 56 if n24' == n24 then doContinue else exitFailure
57
58doContinue = do
59 let allmsgids = [Padding .. Messenger255]
60 allgrpmsgids = [Ping .. MessageName0xff]
61 allmsgs = map Msg allmsgids
62 ++ concatMap (\x -> [GrpMsg KnownLossless x,GrpMsg KnownLossy x]) allgrpmsgids
63 typmap :: [(MessageType,Word64)]
64 typmap = map (\x -> (x, toWord64 x)) allmsgs
65 mapM_ print typmap