(max int)
| 641 | } |
| 642 | |
| 643 | func (w *messageWriter) ncopy(max int) (int, error) { |
| 644 | n := len(w.c.writeBuf) - w.pos |
| 645 | if n <= 0 { |
| 646 | if err := w.flushFrame(false, nil); err != nil { |
| 647 | return 0, err |
| 648 | } |
| 649 | n = len(w.c.writeBuf) - w.pos |
| 650 | } |
| 651 | if n > max { |
| 652 | n = max |
| 653 | } |
| 654 | return n, nil |
| 655 | } |
| 656 | |
| 657 | func (w *messageWriter) Write(p []byte) (int, error) { |
| 658 | if w.err != nil { |
no test coverage detected