From 4372bfa983dcc32455b9fec19bfbeccfec9bf394 Mon Sep 17 00:00:00 2001 From: Martin Geno Date: Fri, 19 Feb 2016 13:47:05 +0100 Subject: [PATCH] update webroot and multicast --- .gitignore | 2 +- .gitmodules | 4 ++++ collector.go | 6 ++---- webroot | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 .gitmodules create mode 160000 webroot diff --git a/.gitignore b/.gitignore index 7f34b90..90cfad9 100644 --- a/.gitignore +++ b/.gitignore @@ -22,5 +22,5 @@ _testmain.go *.exe *.test *.prof - +micro-daemon webroot/nodes.json diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ffd5711 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "webroot"] + path = webroot + url = https://github.com/monitormap/micro-web.git + branch = gh-pages diff --git a/collector.go b/collector.go index 9329a3a..081bc8d 100644 --- a/collector.go +++ b/collector.go @@ -14,7 +14,7 @@ const ( MultiCastGroup string = "ff02:0:0:0:0:0:2:1001" // default udp port used by announced - Port int = 1001 + Port string = "1001" // maximum receivable size MaxDataGramSize int = 8192 @@ -66,9 +66,7 @@ func (coll *Collector) Close() { } func (coll *Collector) sendOnce() { - // TODO - coll.sendPacket("[2a06:8782:ffbb:1337:c24a:ff:fe2c:c7ac]:1001") - coll.sendPacket("[2001:bf7:540:0:32b5:c2ff:fe6e:99d5]:1001") + coll.sendPacket(net.JoinHostPort(MultiCastGroup,Port)) } func (coll *Collector) sendPacket(address string) { diff --git a/webroot b/webroot new file mode 160000 index 0000000..dc5e636 --- /dev/null +++ b/webroot @@ -0,0 +1 @@ +Subproject commit dc5e6368022cf1b32f1dac361ac0ee6d2ae1b55c