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

Method bytes

close.go:295–305  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

293}
294
295func (ce CloseError) bytes() ([]byte, error) {
296 p, err := ce.bytesErr()
297 if err != nil {
298 err = fmt.Errorf("failed to marshal close frame: %w", err)
299 ce = CloseError{
300 Code: StatusInternalError,
301 }
302 p, _ = ce.bytesErr()
303 }
304 return p, err
305}
306
307const maxCloseReason = maxControlPayload - 2
308

Callers 1

writeCloseMethod · 0.95

Calls 1

bytesErrMethod · 0.95

Tested by

no test coverage detected