2018-01-26 18:04:13 +00:00
|
|
|
package network
|
|
|
|
|
|
|
|
import (
|
2018-02-06 06:43:32 +00:00
|
|
|
"github.com/CityOfZion/neo-go/pkg/network/payload"
|
2018-02-01 18:54:23 +00:00
|
|
|
"github.com/CityOfZion/neo-go/pkg/util"
|
2018-01-26 18:04:13 +00:00
|
|
|
)
|
|
|
|
|
2018-03-09 15:55:25 +00:00
|
|
|
// A Peer is the local representation of a remote peer.
|
|
|
|
// It's an interface that may be backed by any concrete
|
|
|
|
// transport.
|
2018-01-31 08:27:08 +00:00
|
|
|
type Peer interface {
|
2018-03-09 15:55:25 +00:00
|
|
|
Version() *payload.Version
|
|
|
|
Endpoint() util.Endpoint
|
|
|
|
Send(*Message)
|
|
|
|
Done() chan struct{}
|
2018-03-10 12:04:06 +00:00
|
|
|
Disconnect(err error)
|
2018-01-31 08:27:08 +00:00
|
|
|
}
|