From 505ccbbf01d341e6c53af7b005ba8affe956d358 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sun, 24 Jun 2018 19:25:42 -0400 Subject: supply hostname for dnssd display --- src/Network/Tox/Avahi.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Network/Tox/Avahi.hs') diff --git a/src/Network/Tox/Avahi.hs b/src/Network/Tox/Avahi.hs index 559e5fd7..635ba656 100644 --- a/src/Network/Tox/Avahi.hs +++ b/src/Network/Tox/Avahi.hs @@ -11,6 +11,7 @@ import Control.Applicative import Data.Foldable import Network.Address import Network.Avahi +import Network.BSD (getHostName) import Network.Tox.NodeId import Text.Read @@ -41,7 +42,9 @@ announceToxServiceWithHostname = (boobs.boobs) announce toxService where boobs = ((.).(.)) announceToxService :: PortNumber -> NodeId -> (Maybe NodeId) -> IO () -announceToxService = announceToxServiceWithHostname "" +announceToxService a b c = do + h <- getHostName + announceToxServiceWithHostname h a b c queryToxService :: (NodeInfo -> Maybe NodeId -> IO ()) -> IO () queryToxService cb = -- cgit v1.2.3