p2p

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const P2PProtoPrefix = "/x/"
View Source
const SwarmKey = "/key/swarm/psk/1.0.0/\n/base16/\n2108249f85354ed11ecf999a4500e9b616f71516b6c222ce630d14e434ef5562"

Variables

View Source
var ProviderSet = wire.NewSet(RunDaemon)

Functions

func RunDaemon

func RunDaemon() (*core.IpfsNode, func(), error)

Types

type P2pService added in v0.0.2

type P2pService struct {
	// contains filtered or unexported fields
}

func NewP2pService added in v0.0.2

func NewP2pService(node *core.IpfsNode) *P2pService

func (*P2pService) CheckPort added in v0.0.2

func (s *P2pService) CheckPort(target ma.Multiaddr) error

checkPort checks whether target multiaddr contains tcp or udp protocol and whether the port is equal to 0

func (*P2pService) CloseListen added in v0.0.2

func (s *P2pService) CloseListen(ctx context.Context, protoOpt string, listenOpt string, targetOpt string) error

func (*P2pService) CreateForward added in v0.0.2

func (s *P2pService) CreateForward(ctx context.Context, protoOpt string, listenOpt string, targetOpt string) error

func (*P2pService) Ping added in v0.0.2

func (s *P2pService) Ping(ctx context.Context, peerId string) bool

Jump to

Keyboard shortcuts

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