forked from TrueCloudLab/neoneo-go
9cf6cc61f4
And replace Transporter.Address() with Transporter.HostPort() along the way.
13 lines
315 B
Go
13 lines
315 B
Go
package network
|
|
|
|
import "time"
|
|
|
|
// Transporter is an interface that allows us to abstract
|
|
// any form of communication between the server and its peers.
|
|
type Transporter interface {
|
|
Dial(addr string, timeout time.Duration) (AddressablePeer, error)
|
|
Accept()
|
|
Proto() string
|
|
HostPort() (string, string)
|
|
Close()
|
|
}
|