(self, x: int = MTU)
| 608 | |
| 609 | class _opened(IO[bytes]): |
| 610 | def read(self, x: int = MTU) -> bytes: |
| 611 | buf = ctypes.create_string_buffer(x) |
| 612 | res = ctypes.windll.kernel32.ReadFile( |
| 613 | fd, |
| 614 | buf, |
| 615 | x, |
| 616 | None, |
| 617 | None, |
| 618 | ) |
| 619 | if res == 0: |
| 620 | raise OSError(ctypes.FormatError()) |
| 621 | return buf.raw |
| 622 | def close(self) -> None: |
| 623 | # ignore failures |
| 624 | ctypes.windll.kernel32.CloseHandle(fd) |
no outgoing calls
no test coverage detected