neoneo-go/pkg/network/transport.go

14 lines
315 B
Go
Raw Normal View History

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()
}