MCPcopy
hub / github.com/WireGuard/wireguard-go / timersAnyAuthenticatedPacketTraversal

Method timersAnyAuthenticatedPacketTraversal

device/timers.go:194–199  ·  view source on GitHub ↗

* Should be called before a packet with authentication -- keepalive, data, or handshake -- is sent, or after one is received. */

()

Source from the content-addressed store, hash-verified

192
193/* Should be called before a packet with authentication -- keepalive, data, or handshake -- is sent, or after one is received. */
194func (peer *Peer) timersAnyAuthenticatedPacketTraversal() {
195 keepalive := peer.persistentKeepaliveInterval.Load()
196 if keepalive > 0 && peer.timersActive() {
197 peer.timers.persistentKeepalive.Mod(time.Duration(keepalive) * time.Second)
198 }
199}
200
201func (peer *Peer) timersInit() {
202 peer.timers.retransmitHandshake = peer.NewTimer(expiredRetransmitHandshake)

Callers 5

SendHandshakeResponseMethod · 0.95
RoutineHandshakeMethod · 0.80

Calls 2

timersActiveMethod · 0.95
ModMethod · 0.80

Tested by

no test coverage detected