WIP
This commit is contained in:
@@ -71,3 +71,12 @@ func (p *Peer) CanRelay() bool {
|
||||
func (p *Peer) PreferredEndpoint() netip.AddrPort {
|
||||
return preferredEndpoint(p.Endpoint4, p.Endpoint6)
|
||||
}
|
||||
|
||||
func (p *Peer) UpdateEndpoints(v4, v6 netip.AddrPort) {
|
||||
if v4.IsValid() {
|
||||
p.Endpoint4 = v4
|
||||
}
|
||||
if v6.IsValid() {
|
||||
p.Endpoint6 = v6
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user