MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / AsyncNetworkingInterface

Class AsyncNetworkingInterface

pymongo/network_layer.py:414–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412
413
414class 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
441class NetworkingInterface(NetworkingInterfaceBase):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected