MCPcopy Create free account
hub / github.com/tailscale/tailscale / Drain

Method Drain

wgengine/netstack/link_endpoint.go:78–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76}
77
78func (q *queue) Drain() int {
79 c := 0
80 for pkt := range q.c {
81 pkt.DecRef()
82 c++
83 }
84 return c
85}
86
87func (q *queue) Num() int {
88 return len(q.c)

Callers 1

DrainMethod · 0.45

Calls 1

DecRefMethod · 0.80

Tested by

no test coverage detected