Categorygithub.com/iotexproject/go-p2p
modulepackage
0.3.7
Repository: https://github.com/iotexproject/go-p2p.git
Documentation: pkg.go.dev

# README

go-p2p

It's the assembly of libp2p to build a working network layer for p2p applications.

# Packages

No description provided by the author

# Functions

ConnectTimeout is the option to override the connect timeout.
DHTGroupID helps node finds peers of the same GroupID in dht discovering.
DHTProtocolID returns the prefix of dht protocol.
EnsureIPv4 returns an IPv4 address regardless the input is a IPv4 address or host name.
ExternalHostName is the option to set the host name or IP address seen from external.
ExternalPort is the option to set the port number seen from external.
GetUnicastStream retrieves net.Stream from unicast request context.
Gossip is to indicate using gossip protocol.
HostName is the option to override the host name or IP address.
Logger returns the logger.
MasterKey is to determine network identifier.
NewHost constructs a host struct.
NewLRUBlacklist creates a new LRUBlacklist with capacity cap.
Port is the option to override the port number.
PrivateNetworkPSK is to determine network identifier.
SecureIO is to indicate using secured I/O.
SetLogger sets the logger.
WithConnectionManagerConfig set configuration for connection manager.
WithMaxConnAndStream config MaxConn and MaxStreamPerPeer option.
WithMaxMessageSize config MaxMessageSize option.
WithMaxPeer config MaxPeer option.
WithRateLimit is to indicate limiting msg rate from peers.
WithRelay config relay option.

# Variables

DefaultConfig is a set of default configs.
DefaultRatelimitConfig is the default rate limit config.

# Structs

No description provided by the author
Host is the main struct that represents a host that communicating with the rest of the P2P networks.
LRUBlacklist is a blacklist implementation using an LRU cache.
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
Option defines the option function to modify the config for a host.