p2pconn

package
v0.0.0-...-d4b7e32 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddr

func NewAddr[A p2p.Addr](s p2p.Swarm[A], a A) net.Addr

func NewPacketConn

func NewPacketConn[A p2p.Addr](s p2p.Swarm[A]) net.PacketConn

NewPacketConn turns a Swarm into a net.PacketConn Asks are not served, if you have an ask swarm you will need to handle or discard asks separately

Types

type Addr

type Addr[A p2p.Addr] struct {
	p2p.Swarm[A]
	Addr A
}

func (Addr[A]) Network

func (a Addr[A]) Network() string

func (Addr[A]) String

func (a Addr[A]) String() string

Jump to

Keyboard shortcuts

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