2014-11-16 13:13:20 -07:00
|
|
|
// Copyright (C) 2014 The Syncthing Authors.
|
2014-09-29 12:43:32 -07:00
|
|
|
//
|
2015-03-07 13:36:35 -07:00
|
|
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
2017-02-08 23:52:18 -07:00
|
|
|
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
2014-08-17 06:01:48 -07:00
|
|
|
|
|
|
|
package beacon
|
|
|
|
|
2015-09-20 06:30:25 -07:00
|
|
|
import (
|
|
|
|
"net"
|
|
|
|
|
2018-09-08 02:56:56 -07:00
|
|
|
"github.com/thejerf/suture"
|
2015-09-20 06:30:25 -07:00
|
|
|
)
|
2014-08-17 06:01:48 -07:00
|
|
|
|
|
|
|
type recv struct {
|
|
|
|
data []byte
|
|
|
|
src net.Addr
|
|
|
|
}
|
|
|
|
|
|
|
|
type Interface interface {
|
2015-09-20 06:30:25 -07:00
|
|
|
suture.Service
|
2014-08-17 06:01:48 -07:00
|
|
|
Send(data []byte)
|
|
|
|
Recv() ([]byte, net.Addr)
|
2015-09-20 06:30:25 -07:00
|
|
|
Error() error
|
2014-08-17 06:01:48 -07:00
|
|
|
}
|