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

Method read

conn.go:370–377  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

368}
369
370func (c *Conn) read(n int) ([]byte, error) {
371 p, err := c.br.Peek(n)
372 if err == io.EOF {
373 err = errUnexpectedEOF
374 }
375 c.br.Discard(len(p))
376 return p, err
377}
378
379func (c *Conn) write(frameType int, deadline time.Time, buf0, buf1 []byte) error {
380 <-c.mu

Callers 1

advanceFrameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected