From 201d2b6c883b269e03038bde25e07fefaec7f8e4 Mon Sep 17 00:00:00 2001 From: James Crayne Date: Tue, 29 May 2018 20:53:30 +0000 Subject: some junk, stash in testcookie for now --- examples/testcookie.hs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'examples') 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(..)) import Data.Serialize as S +import Network.Tox.Crypto.Transport +import Data.Word + -- -- Some relevant functions: -- @@ -50,4 +53,13 @@ main = do exitFailure Right n24' -> do putStrLn $ "n24' = " ++ show n24' - if n24' == n24 then exitSuccess else exitFailure + if n24' == n24 then doContinue else exitFailure + +doContinue = do + let allmsgids = [Padding .. Messenger255] + allgrpmsgids = [Ping .. MessageName0xff] + allmsgs = map Msg allmsgids + ++ concatMap (\x -> [GrpMsg KnownLossless x,GrpMsg KnownLossy x]) allgrpmsgids + typmap :: [(MessageType,Word64)] + typmap = map (\x -> (x, toWord64 x)) allmsgs + mapM_ print typmap -- cgit v1.2.3