(self)
| 776 | self._start_shutdown() |
| 777 | |
| 778 | def _do_read__copied(self): |
| 779 | chunk = b'1' |
| 780 | zero = True |
| 781 | one = False |
| 782 | |
| 783 | try: |
| 784 | while True: |
| 785 | chunk = self._sslobj.read(self.max_size) |
| 786 | if not chunk: |
| 787 | break |
| 788 | if zero: |
| 789 | zero = False |
| 790 | one = True |
| 791 | first = chunk |
| 792 | elif one: |
| 793 | one = False |
| 794 | data = [first, chunk] |
| 795 | else: |
| 796 | data.append(chunk) |
| 797 | except SSLAgainErrors: |
| 798 | pass |
| 799 | if one: |
| 800 | self._app_protocol.data_received(first) |
| 801 | elif not zero: |
| 802 | self._app_protocol.data_received(b''.join(data)) |
| 803 | if not chunk: |
| 804 | # close_notify |
| 805 | self._call_eof_received() |
| 806 | self._start_shutdown() |
| 807 | |
| 808 | def _call_eof_received(self): |
| 809 | try: |
no test coverage detected