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

Method write

write.go:223–230  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

221}
222
223func (mw *msgWriter) write(p []byte) (int, error) {
224 n, err := mw.c.writeFrame(mw.ctx, false, mw.flate, mw.opcode, p)
225 if err != nil {
226 return n, fmt.Errorf("failed to write data frame: %w", err)
227 }
228 mw.opcode = opContinuation
229 return n, nil
230}
231
232// Close flushes the frame to the connection.
233func (mw *msgWriter) Close() (err error) {

Callers 1

WriteMethod · 0.95

Calls 1

writeFrameMethod · 0.80

Tested by

no test coverage detected