MCPcopy
hub / github.com/wavetermdev/waveterm / MakeStreamManagerWithSizes

Function MakeStreamManagerWithSizes

pkg/jobmanager/streammanager.go:69–79  ·  view source on GitHub ↗
(cwndSize, cirbufSize int)

Source from the content-addressed store, hash-verified

67}
68
69func MakeStreamManagerWithSizes(cwndSize, cirbufSize int) *StreamManager {
70 sm := &StreamManager{
71 buf: MakeCirBuf(cirbufSize, true),
72 eofPos: -1,
73 cwndSize: cwndSize,
74 rwndSize: cwndSize,
75 }
76 sm.drainCond = sync.NewCond(&sm.lock)
77 go sm.senderLoop()
78 return sm
79}
80
81// AttachReader starts reading from the given reader
82func (sm *StreamManager) AttachReader(r io.Reader) error {

Callers 3

runStreamManagerModeFunction · 0.92
TestFlowControlFunction · 0.85
MakeStreamManagerFunction · 0.85

Calls 2

senderLoopMethod · 0.95
MakeCirBufFunction · 0.85

Tested by 1

TestFlowControlFunction · 0.68