p2p

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileTransferProtocol = "/filchain/transfer/1.0.0"
)

Variables

This section is empty.

Functions

func Advertise(discovery *discovery.RoutingDiscovery, id string) error

func FindProviders

func FindProviders(discovery *discovery.RoutingDiscovery, id string, limit int) ([]peer.AddrInfo, error)

todo is thread safe?

func GenerateFileTransferProtocol

func GenerateFileTransferProtocol(infohash string) protocol.ID

func NewRoutedDiscovery

func NewRoutedDiscovery(h host.Host) (*discovery.RoutingDiscovery, error)

todo mode server

func NewRoutedHost

func NewRoutedHost(listenPort int, bootstrapPeers []string, priv crypto.PrivKey) (host.Host, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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