summaryrefslogtreecommitdiffstats
path: root/beacon
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2014-06-01 22:47:50 +0200
committerJakob Borg <jakob@nym.se>2014-06-01 22:47:50 +0200
commit26c33c4a69bed46744a1af76be6280844b7432f3 (patch)
tree9471fcd559e2a1f9c9587da16bbf9928899a625b /beacon
parent2db76ae78627571ab42bda9421afeec392b19ee8 (diff)
Remove obsolete mctest
Diffstat (limited to 'beacon')
-rw-r--r--beacon/cmd/mctest/main.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/beacon/cmd/mctest/main.go b/beacon/cmd/mctest/main.go
deleted file mode 100644
index a34e461a76..0000000000
--- a/beacon/cmd/mctest/main.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package main
-
-import (
- "encoding/binary"
- "log"
- "time"
-
- "github.com/calmh/syncthing/beacon"
-)
-
-func main() {
- b, err := beacon.NewBeacon(21025)
- if err != nil {
- log.Fatal(err)
- }
- go func() {
- for {
- bs, addr := b.Recv()
- log.Printf("Received %d bytes from %s: %x %x", len(bs), addr, bs[:8], bs[8:])
- }
- }()
- go func() {
- bs := [16]byte{}
- binary.BigEndian.PutUint64(bs[:], uint64(time.Now().UnixNano()))
- log.Printf("My ID: %x", bs[:8])
- for {
- binary.BigEndian.PutUint64(bs[8:], uint64(time.Now().UnixNano()))
- b.Send(bs[:])
- log.Printf("Sent %d bytes", len(bs[:]))
- time.Sleep(10 * time.Second)
- }
- }()
- select {}
-}