(self, list_of_data)
| 1168 | self._sock.shutdown(socket.SHUT_WR) |
| 1169 | |
| 1170 | def writelines(self, list_of_data): |
| 1171 | if self._eof: |
| 1172 | raise RuntimeError('Cannot call writelines() after write_eof()') |
| 1173 | if self._empty_waiter is not None: |
| 1174 | raise RuntimeError('unable to writelines; sendfile is in progress') |
| 1175 | if not list_of_data: |
| 1176 | return |
| 1177 | |
| 1178 | if self._conn_lost: |
| 1179 | if self._conn_lost >= constants.LOG_THRESHOLD_FOR_CONNLOST_WRITES: |
| 1180 | logger.warning('socket.send() raised exception.') |
| 1181 | self._conn_lost += 1 |
| 1182 | return |
| 1183 | |
| 1184 | self._buffer.extend([memoryview(data) for data in list_of_data]) |
| 1185 | self._write_ready() |
| 1186 | # If the entire buffer couldn't be written, register a write handler |
| 1187 | if self._buffer: |
| 1188 | self._loop._add_writer(self._sock_fd, self._write_ready) |
| 1189 | self._maybe_pause_protocol() |
| 1190 | |
| 1191 | def can_write_eof(self): |
| 1192 | return True |
nothing calls this directly
no test coverage detected