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

Method RecordBytesRead

export_test.go:20–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18}
19
20func (c *Conn) RecordBytesRead() *int {
21 var bytesRead int
22 c.br.Reset(util.ReaderFunc(func(p []byte) (int, error) {
23 n, err := c.rwc.Read(p)
24 bytesRead += n
25 return n, err
26 }))
27 return &bytesRead
28}
29
30var ErrClosed = net.ErrClosed
31

Callers 1

BenchmarkConnFunction · 0.80

Calls 2

ReaderFuncFuncType · 0.92
ReadMethod · 0.45

Tested by

no test coverage detected