(data []byte)
| 983 | } |
| 984 | |
| 985 | func (c *Conn) write(data []byte) (int, error) { |
| 986 | if c.buffering { |
| 987 | c.sendBuf = append(c.sendBuf, data...) |
| 988 | return len(data), nil |
| 989 | } |
| 990 | |
| 991 | n, err := c.conn.Write(data) |
| 992 | c.bytesSent += int64(n) |
| 993 | return n, err |
| 994 | } |
| 995 | |
| 996 | func (c *Conn) flush() (int, error) { |
| 997 | if len(c.sendBuf) == 0 { |
no test coverage detected