protocol

package
v0.0.0-...-cf96749 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolID = "/pi/1.0.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PiProtocol

type PiProtocol struct {
	peer.ID
	// contains filtered or unexported fields
}

func NewPiProtocol

func NewPiProtocol(privateKey *ecdsa.PrivateKey) (*PiProtocol, error)

func (*PiProtocol) HandleStream

func (p *PiProtocol) HandleStream(s network.Stream)

func (*PiProtocol) SendMessage

func (p *PiProtocol) SendMessage(ctx context.Context, peerID peer.ID, msg []byte) error

Jump to

Keyboard shortcuts

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