Versions in this module Expand all Collapse all v1 v1.2.0 Oct 10, 2024 v1.0.0 May 18, 2024 Changes in this version + type NetAdapter struct + func NewNetAdapter(cfg *config.Config) (*NetAdapter, error) + func (na *NetAdapter) ID() *id.ID + func (na *NetAdapter) P2PBroadcast(netConnections []*NetConnection, message appmessage.Message) error + func (na *NetAdapter) P2PConnect(address string) error + func (na *NetAdapter) P2PConnectionCount() int + func (na *NetAdapter) P2PConnections() []*NetConnection + func (na *NetAdapter) SetP2PRouterInitializer(routerInitializer RouterInitializer) + func (na *NetAdapter) SetRPCRouterInitializer(routerInitializer RouterInitializer) + func (na *NetAdapter) Start() error + func (na *NetAdapter) Stop() error + type NetConnection struct + func (c *NetConnection) Address() string + func (c *NetConnection) Disconnect() + func (c *NetConnection) ID() *id.ID + func (c *NetConnection) IsOutbound() bool + func (c *NetConnection) NetAddress() *appmessage.NetAddress + func (c *NetConnection) SetID(peerID *id.ID) + func (c *NetConnection) SetOnInvalidMessageHandler(onInvalidMessageHandler server.OnInvalidMessageHandler) + func (c *NetConnection) String() string + type RouterInitializer func(*routerpkg.Router, *NetConnection)