Read specified amount of bytes.
(self, out, buf, length=0)
| 350 | yield from buf.skipuntil(b'\r\n') |
| 351 | |
| 352 | def parse_length_payload(self, out, buf, length=0): |
| 353 | """Read specified amount of bytes.""" |
| 354 | required = length |
| 355 | while required: |
| 356 | chunk = yield from buf.readsome(required) |
| 357 | out.feed_data(chunk, len(chunk)) |
| 358 | required -= len(chunk) |
| 359 | |
| 360 | def parse_eof_payload(self, out, buf): |
| 361 | """Read all bytes until eof.""" |