MCPcopy Create free account
hub / github.com/imroc/req / streamByID

Method streamByID

internal/http2/frame.go:494–505  ·  view source on GitHub ↗
(id uint32)

Source from the content-addressed store, hash-verified

492}
493
494func (h2f *Framer) streamByID(id uint32) *clientStream {
495 if h2f.cc == nil {
496 return nil
497 }
498 h2f.cc.mu.Lock()
499 defer h2f.cc.mu.Unlock()
500 cs := h2f.cc.streams[id]
501 if cs != nil && !cs.readAborted {
502 return cs
503 }
504 return nil
505}
506
507func (h2f *Framer) currentRequest(id uint32) *http.Request {
508 if cs := h2f.streamByID(id); cs != nil {

Callers 1

currentRequestMethod · 0.95

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected