node

package
v0.0.0-...-32ff903 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseNode

type BaseNode struct {
	ListenAddress ma.Multiaddr
	P2PPrivateKey crypto.PrivKey
	Host          host.Host
}

func NewRandomBaseNode

func NewRandomBaseNode(port uint16) *BaseNode

func (*BaseNode) NewStream

func (node *BaseNode) NewStream(ctx context.Context, p peer.ID, pids ...p2pprotocol.ID) (network.Stream, error)

func (*BaseNode) SetStreamHandler

func (node *BaseNode) SetStreamHandler(pid p2pprotocol.ID, handler network.StreamHandler)

Directories

Path Synopsis
pb

Jump to

Keyboard shortcuts

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