| 599 | |
| 600 | @implementer(IBodyProducer) |
| 601 | class _RequestBodyProducer: |
| 602 | def __init__(self, body: bytes): |
| 603 | self.body = body |
| 604 | self.length = len(body) |
| 605 | |
| 606 | def startProducing(self, consumer: IConsumer) -> Deferred[None]: |
| 607 | consumer.write(self.body) |
| 608 | return succeed(None) |
| 609 | |
| 610 | def pauseProducing(self) -> None: |
| 611 | pass |
| 612 | |
| 613 | def stopProducing(self) -> None: |
| 614 | pass |
| 615 | |
| 616 | |
| 617 | class _ResponseReader(Protocol): |
no outgoing calls