summaryrefslogtreecommitdiff
path: root/avahi.hs
diff options
context:
space:
mode:
Diffstat (limited to 'avahi.hs')
-rw-r--r--avahi.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/avahi.hs b/avahi.hs
new file mode 100644
index 00000000..2db3be71
--- /dev/null
+++ b/avahi.hs
@@ -0,0 +1,14 @@
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 $ announceToxService hostname (fromMaybe 54321 $ readMaybe port) (fromMaybe exampleNodeId $ readMaybe nodeId)
13 void $ queryToxService print
14 void $ getLine