network

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Host        host.Host
	PingService *ping.PingService
}

Node represents a p2p network node

func NewNode

func NewNode(ctx context.Context, port int) (*Node, error)

NewNode creates a new p2p node

func (*Node) Close

func (n *Node) Close() error

Close shuts down the node

func (*Node) Connect

func (n *Node) Connect(ctx context.Context, peerAddr string) error

Connect attempts to connect to a peer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL