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

Method ReadContext

wgengine/netstack/link_endpoint.go:54–61  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

52}
53
54func (q *queue) ReadContext(ctx context.Context) *stack.PacketBuffer {
55 select {
56 case pkt := <-q.c:
57 return pkt
58 case <-ctx.Done():
59 return nil
60 }
61}
62
63func (q *queue) Write(pkt *stack.PacketBuffer) tcpip.Error {
64 q.mu.RLock()

Callers 3

ReadContextMethod · 0.45
injectMethod · 0.45
initStackMethod · 0.45

Calls 1

DoneMethod · 0.65

Tested by

no test coverage detected