Read implement net.Conn.
(b []byte)
| 40 | |
| 41 | // Read implement net.Conn. |
| 42 | func (c *meteredConn) Read(b []byte) (n int, err error) { |
| 43 | n, err = c.Conn.Read(b) |
| 44 | if n > 0 { |
| 45 | c.addReceivedBytes(int64(n)) |
| 46 | } |
| 47 | return n, err |
| 48 | } |
| 49 | |
| 50 | // Write implement net.Conn. |
| 51 | func (c *meteredConn) Write(b []byte) (n int, err error) { |
nothing calls this directly
no test coverage detected