Documentation ¶
Index ¶
Constants ¶
View Source
const ( BUF = 1424 // Max packet size, 1500 MTU is typical, avoids packet fragmentation. FANOUT = 2 // Number of peers randomly selected when selecting more than one. PROBE = 8 // Inverse of probability that an untrusted peer is randomly selected. GETNPEER = 2 // Limit of peer descriptors in a PEER message. TRUSTEXP = .375 // Exponent to apply to trust score to flatten distribution of peer selection. DELAY = 14197 // Epochs until new peers may be randomly selected. PING = 5039 // Epochs until silent peers are pinged with a GETPEER message. DROP = 131071 // Epochs until silent peers are dropped from the peer table. PUSH = 3 // Epcohs between sending one random mew dat to one random peer, excluding edges. SEED = 7 // Epochs between sending one random dat to one random peer, excluding edges. EDGEPUSH = 1949 // Epochs between sending one random new dat to one random edge peer. EDGESEED = 3889 // Epochs between sending one random dat to one random edge peer. PULL = 9377 // Interval between pulling a random dat from a random peer. Increases anonymity. )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cfg ¶
type Cfg struct { LstnAddr *net.UDPAddr // Listening address:port Edges []netip.AddrPort // Bootstrap peers Epoch time.Duration // Base cycle, lower runs faster, using more bandwidth Prune int // Interval between refreshing dat & peer maps ShardCap int // Cuckoo filter capacity FilterCap uint // Dat map capacity Log chan<- []byte // Log messages Test bool // Allow multiple ports per IP BackupFname string // Dat and peer table backup filename }
Click to show internal directories.
Click to hide internal directories.