p2p

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	p2p.Command
	Id   uint32
	Body []byte
}

type Factory

type Factory struct {
	helpers.Methods
	// contains filtered or unexported fields
}

func New

func New(i vm.Instance, p2pNode p2pIface.Service, helper helpers.Methods) *Factory

func (*Factory) Close

func (f *Factory) Close() error

func (*Factory) Load

func (f *Factory) Load(hm vm.HostModule) (err error)

func (*Factory) Name

func (f *Factory) Name() string

func (*Factory) W_discoverPeers

func (f *Factory) W_discoverPeers(ctx context.Context, module common.Module,
	id,
	peersBuf uint32,
) errno.Error

func (*Factory) W_discoverPeersSize

func (f *Factory) W_discoverPeersSize(ctx context.Context, module common.Module,
	max uint32,
	nsTimeout uint32,
	discoverIdPtr uint32,
	sizePtr uint32,
) errno.Error

func (*Factory) W_listenToProtocol

func (f *Factory) W_listenToProtocol(ctx context.Context, module common.Module,
	protocolPtr, protocolLen,
	response, responseSize uint32,
) (err errno.Error)

func (*Factory) W_listenToProtocolSize

func (f *Factory) W_listenToProtocolSize(ctx context.Context, module common.Module,
	protocolPtr, protocolLen,
	responseSizePtr uint32,
) (err errno.Error)

func (*Factory) W_newCommand

func (f *Factory) W_newCommand(
	ctx context.Context,
	module common.Module,
	protocolPtr, protocolLen,
	commandPtr, commandLen,
	commandIdPtr uint32,
) (err errno.Error)

func (*Factory) W_readCommandResponse

func (f *Factory) W_readCommandResponse(ctx context.Context, module common.Module,
	commandId,
	dataBuf, dataSize uint32,
) (err errno.Error)

func (*Factory) W_sendCommand

func (f *Factory) W_sendCommand(ctx context.Context, module common.Module,
	commandId,
	dataBuf, dataSize,
	responseSize uint32,
) (err0 errno.Error)

func (*Factory) W_sendCommandTo

func (f *Factory) W_sendCommandTo(ctx context.Context, module common.Module,
	commandId,
	cidBuf,
	dataBuf, dataSize,
	responseSize uint32,
) (err0 errno.Error)

Jump to

Keyboard shortcuts

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