MCPcopy Index your code
hub / github.com/tailscale/tailscale / setTSMPPongCallback

Method setTSMPPongCallback

wgengine/userspace.go:1509–1520  ·  view source on GitHub ↗
(data [8]byte, cb func(packet.TSMPPongReply))

Source from the content-addressed store, hash-verified

1507}
1508
1509func (e *userspaceEngine) setTSMPPongCallback(data [8]byte, cb func(packet.TSMPPongReply)) {
1510 e.mu.Lock()
1511 defer e.mu.Unlock()
1512 if e.pongCallback == nil {
1513 e.pongCallback = map[[8]byte]func(packet.TSMPPongReply){}
1514 }
1515 if cb == nil {
1516 delete(e.pongCallback, data)
1517 } else {
1518 e.pongCallback[data] = cb
1519 }
1520}
1521
1522func (e *userspaceEngine) setICMPEchoResponseCallback(idSeq uint32, cb func()) {
1523 e.mu.Lock()

Callers 1

sendTSMPPingMethod · 0.95

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected