(self, file, offset, count)
| 459 | file.seek(offset + total_sent) |
| 460 | |
| 461 | def _check_sendfile_params(self, file, offset, count): |
| 462 | if 'b' not in getattr(file, 'mode', 'b'): |
| 463 | raise ValueError("file should be opened in binary mode") |
| 464 | if not self.type & SOCK_STREAM: |
| 465 | raise ValueError("only SOCK_STREAM type sockets are supported") |
| 466 | if count is not None: |
| 467 | if not isinstance(count, int): |
| 468 | raise TypeError( |
| 469 | "count must be a positive integer (got {!r})".format(count)) |
| 470 | if count <= 0: |
| 471 | raise ValueError( |
| 472 | "count must be a positive integer (got {!r})".format(count)) |
| 473 | |
| 474 | def sendfile(self, file, offset=0, count=None): |
| 475 | """sendfile(file[, offset[, count]]) -> sent |
no test coverage detected