MCPcopy
hub / github.com/google/gopacket / StreamPool

Struct StreamPool

reassembly/memory.go:138–147  ·  view source on GitHub ↗

* * StreamPool */ StreamPool stores all streams created by Assemblers, allowing multiple assemblers to work together on stream processing while enforcing the fact that a single stream receives its data serially. It is safe for concurrency, usable by multiple Assemblers at once. StreamPool handle

Source from the content-addressed store, hash-verified

136// Assembler, though, it does have to do some locking to make sure that the
137// connection objects it stores are accessible to multiple Assemblers.
138type StreamPool struct {
139 conns map[key]*connection
140 users int
141 mu sync.RWMutex
142 factory StreamFactory
143 free []*connection
144 all [][]connection
145 nextAlloc int
146 newConnectionCount int64
147}
148
149func (p *StreamPool) grow() {
150 conns := make([]connection, p.nextAlloc)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected