MCPcopy
hub / github.com/coder/websocket / close

Method close

compress.go:210–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208}
209
210func (sw *slidingWindow) close() {
211 sw.buf = sw.buf[:0]
212 swPoolMu.Lock()
213 swPool[cap(sw.buf)].Put(sw)
214 swPoolMu.Unlock()
215}
216
217func (sw *slidingWindow) write(p []byte) {
218 if len(p) >= cap(sw.buf) {

Callers

nothing calls this directly

Calls 1

LockMethod · 0.45

Tested by

no test coverage detected