diff options
Diffstat (limited to 'avahi.hs')
-rw-r--r-- | avahi.hs | 14 |
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 | |||
3 | import BasePrelude | ||
4 | import Network.Tox.Avahi | ||
5 | |||
6 | exampleNodeId :: NodeId | ||
7 | exampleNodeId = read $ replicate 43 'a' | ||
8 | |||
9 | main :: IO () | ||
10 | main = 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 | ||