peer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(peerPacket PeerPacket) ([]byte, error)

Types

type PeerInfo

type PeerInfo struct {
	IP         net.IP
	NatIP      net.IP
	RemoteAddr net.UDPAddr
	PubKey     security.NoisePublicKey
}

func (PeerInfo) String

func (p PeerInfo) String() string

type PeerPacket

type PeerPacket struct {
	Header packet.Header
	Peers  []PeerInfo
}

func Decode

func Decode(buff []byte) (peerPacket PeerPacket, err error)

func NewPeerPacket

func NewPeerPacket(userId string) PeerPacket

Jump to

Keyboard shortcuts

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