Documentation ¶
Overview ¶
Package p2p implements a TCP based perfect peer-to-peer link.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WithDefault = func(n *Node) { n.Node = node.New(node.WithDefault) }
WithDefault can be used to instantiate a new node with default options.
Functions ¶
func WithChannel ¶
WithChannel sets the RPC channel name when instantiating a new p2p node.
func WithKeepAlive ¶
WithKeepAlive sets the TCP keepalive when instantiating a new p2p node (e.g. New(WithKeepAlive(1 * time.Seconds), ...)).
Types ¶
Click to show internal directories.
Click to hide internal directories.