summaryrefslogtreecommitdiff
path: root/examples/avahi.hs
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2019-09-28 13:43:29 -0400
committerJoe Crayne <joe@jerkface.net>2020-01-01 19:27:53 -0500
commit11987749fc6e6d3e53ea737d46d5ab13a16faeb8 (patch)
tree5716463275c2d3e902889db619908ded2a73971c /examples/avahi.hs
parentadd2c76bced51fde5e9917e7449ef52be70faf87 (diff)
Factor out some new libraries
word64-map: Data.Word64Map network-addr: Network.Address tox-crypto: Crypto.Tox lifted-concurrent: Control.Concurrent.Lifted.Instrument Control.Concurrent.Async.Lifted.Instrument psq-wrap: Data.Wrapper.PSQInt Data.Wrapper.PSQ minmax-psq: Data.MinMaxPSQ tasks: Control.Concurrent.Tasks kad: Network.Kademlia Network.Kademlia.Bootstrap Network.Kademlia.Routing Network.Kademlia.CommonAPI Network.Kademlia.Persistence Network.Kademlia.Search
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