diff options
author | 2012-10-22 15:50:30 -0400 | |
---|---|---|
committer | 2012-10-22 15:50:30 -0400 | |
commit | 45089d8f8e316bba70a7a89284bc6c8761ccfdff (patch) | |
tree | 0d51ce4fd8d438c380505f59dc488f56e2f4f10d /Assistant/Pairing/Network.hs | |
parent | ea6234c57861d4b9abdfa80a6453620a55c964c0 (diff) |
webapp: Switched to using the same multicast IP address that avahi uses.
Diffstat (limited to 'Assistant/Pairing/Network.hs')
-rw-r--r-- | Assistant/Pairing/Network.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Assistant/Pairing/Network.hs b/Assistant/Pairing/Network.hs index a6289c035..73de9c760 100644 --- a/Assistant/Pairing/Network.hs +++ b/Assistant/Pairing/Network.hs @@ -31,11 +31,12 @@ import Control.Concurrent pairingPort :: PortNumber pairingPort = 55556 -{- This is the All Hosts multicast group, which should reach all hosts - - on the same network segment. -} +{- Goal: Reach all hosts on the same network segment. + - Method: Use same address that avahi uses. Other broadcast addresses seem + - to not be let through some routers. -} multicastAddress :: SomeAddr -> HostName -multicastAddress (IPv4Addr _) = "224.0.0.1" -multicastAddress (IPv6Addr _) = "ff02::1" +multicastAddress (IPv4Addr _) = "224.0.0.251" +multicastAddress (IPv6Addr _) = "ff02::fb" {- Multicasts a message repeatedly on all interfaces, with a 2 second - delay between each transmission. The message is repeated forever |