summaryrefslogtreecommitdiff
path: root/examples/avahi.hs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/avahi.hs')
-rw-r--r--examples/avahi.hs16
1 files changed, 0 insertions, 16 deletions
diff --git a/examples/avahi.hs b/examples/avahi.hs
deleted file mode 100644
index e5567875..00000000
--- a/examples/avahi.hs
+++ /dev/null
@@ -1,16 +0,0 @@
1{-# LANGUAGE NoImplicitPrelude #-}
2
3import BasePrelude
4import Network.Tox.Avahi
5
6exampleNodeId :: NodeId
7exampleNodeId = read $ replicate 43 'a'
8
9main :: IO ()
10main = do
11 [hostname, port, nodeId] <- getArgs
12 void $ forkIO $ announceToxServiceWithHostname
13 hostname (fromMaybe 54321 $ readMaybe port)
14 (fromMaybe exampleNodeId $ readMaybe nodeId) Nothing
15 void $ forkIO $ queryToxService (curry print)
16 void $ getLine