| 412 | |
| 413 | |
| 414 | class AsyncNetworkingInterface(NetworkingInterfaceBase): |
| 415 | def __init__(self, conn: tuple[Transport, PyMongoProtocol]): |
| 416 | super().__init__(conn) |
| 417 | |
| 418 | @property |
| 419 | def gettimeout(self) -> float | None: |
| 420 | return self.conn[1].gettimeout |
| 421 | |
| 422 | def settimeout(self, timeout: float | None) -> None: |
| 423 | self.conn[1].settimeout(timeout) |
| 424 | |
| 425 | async def close(self) -> None: |
| 426 | self.conn[1].close() |
| 427 | await self.conn[1].wait_closed() |
| 428 | |
| 429 | def is_closing(self) -> bool: |
| 430 | return self.conn[0].is_closing() |
| 431 | |
| 432 | @property |
| 433 | def get_conn(self) -> PyMongoProtocol: |
| 434 | return self.conn[1] |
| 435 | |
| 436 | @property |
| 437 | def sock(self) -> socket.socket: |
| 438 | return self.conn[0].get_extra_info("socket") |
| 439 | |
| 440 | |
| 441 | class NetworkingInterface(NetworkingInterfaceBase): |
no outgoing calls
no test coverage detected