Documentation
¶
Index ¶
- Constants
- func Factory(params mesh256.NetworkParams) mesh256.Network
- func NewRouter(log *slog.Logger) neteng.Router
- type Beacon
- type Header
- type Network
- type Router
- func (r *Router) FindAddr(send neteng.SendFunc, info neteng.InfoFunc, prefix []byte, nbits int)
- func (r *Router) HandleAbove(dst inet256.Addr, data p2p.IOVec, send neteng.SendFunc) bool
- func (r *Router) HandleBelow(from inet256.Addr, data []byte, send neteng.SendFunc, ...)
- func (r *Router) Heartbeat(now time.Time, send neteng.SendFunc)
- func (r *Router) LookupPublicKey(send neteng.SendFunc, info neteng.InfoFunc, target inet256.Addr)
- func (r *Router) Reset(privateKey inet256.PrivateKey, peers mesh256.PeerSet, ...)
Constants ¶
View Source
const ( TypeData = uint8(0) TypeBeacon = uint8(1) )
View Source
const (
HeaderSize = 1 + 32 + 32
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Header ¶
type Header [HeaderSize]byte
type Router ¶ added in v0.0.4
type Router struct {
// contains filtered or unexported fields
}
func (*Router) HandleAbove ¶ added in v0.0.4
func (*Router) HandleBelow ¶ added in v0.0.4
func (*Router) LookupPublicKey ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.