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