MCPcopy
hub / github.com/gorilla/websocket / Close

Method Close

compression.go:105–120  ·  compression.go::flateWriteWrapper.Close
()

Source from the content-addressed store, hash-verified

103}
104
105func (w *flateWriteWrapper) Close() error {
106 if w.fw == nil {
107 return errWriteClosed
108 }
109 err1 := w.fw.Flush()
110 w.p.Put(w.fw)
111 w.fw = nil
112 if w.tw.p != [4]byte{0, 0, 0xff, 0xff} {
113 return errors.New("websocket: internal error, unexpected bytes at end of flate stream")
114 }
115 err2 := w.tw.w.Close()
116 if err1 != nil {
117 return err1
118 }
119 return err2
120}
121
122type flateReadWrapper struct {
123 fr io.ReadCloser

Callers

nothing calls this directly

Calls 2

PutMethod · 0.65
CloseMethod · 0.45

Tested by

no test coverage detected