MCPcopy Create free account
hub / github.com/encodeous/nylon / timersDataReceived

Method timersDataReceived

polyamide/device/timers.go:145–153  ·  view source on GitHub ↗

* Should be called after an authenticated data packet is received. */

()

Source from the content-addressed store, hash-verified

143
144/* Should be called after an authenticated data packet is received. */
145func (peer *Peer) timersDataReceived() {
146 if peer.timersActive() {
147 if !peer.timers.sendKeepalive.IsPending() {
148 peer.timers.sendKeepalive.Mod(KeepaliveTimeout)
149 } else {
150 peer.timers.needAnotherKeepalive.Store(true)
151 }
152 }
153}
154
155/* Should be called after any type of authenticated packet is sent -- keepalive, data, or handshake. */
156func (peer *Peer) timersAnyAuthenticatedPacketSent() {

Callers 1

Calls 3

timersActiveMethod · 0.95
IsPendingMethod · 0.80
ModMethod · 0.80

Tested by

no test coverage detected