(data []byte)
| 1013 | } |
| 1014 | |
| 1015 | func (c *Conn) write(data []byte) (int, error) { |
| 1016 | if c.buffering { |
| 1017 | c.sendBuf = append(c.sendBuf, data...) |
| 1018 | return len(data), nil |
| 1019 | } |
| 1020 | |
| 1021 | n, err := c.conn.Write(data) |
| 1022 | c.bytesSent += int64(n) |
| 1023 | return n, err |
| 1024 | } |
| 1025 | |
| 1026 | func (c *Conn) flush() (int, error) { |
| 1027 | if len(c.sendBuf) == 0 { |
no test coverage detected