MCPcopy Create free account
hub / github.com/One-com/gone / StartTimer

Function StartTimer

netutil/reaper/conn.go:42–59  ·  view source on GitHub ↗

StartTimer allows to put a timer on a Conn, and via time.AfterFunc have a function called. The provided afterfunc is called with the net.Conn created by this package - if any. Meaning, that even if wrapped with TLS, calling Close() will close the underlying connection regardless of TLS state.

(c net.Conn, to time.Duration, afterfunc func(wrapped net.Conn))

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 2

reaperConnFunction · 0.85
StopMethod · 0.80

Tested by

no test coverage detected