Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func (*Listener) PushToAccept ¶
type Network ¶
type Network interface {
// NewListener will gen random ip to listen
NewListener(id common.PeerId) (string, net.Listener)
// addr: ip:port
NewListenerWithAddr(id common.PeerId, addr string) net.Listener
// NewDialer will gen random source IP
NewDialer(id common.PeerId) connect_controller.Dialer
NewDialerWithHost(id common.PeerId, host string) connect_controller.Dialer
AllowConnect(id1, id2 common.PeerId)
DeliverRate(percent uint)
}
func NewNetwork ¶
func NewNetwork() Network
Click to show internal directories.
Click to hide internal directories.