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

Function async_sendall

pymongo/network_layer.py:687–692  ·  view source on GitHub ↗
(conn: PyMongoProtocol, buf: bytes)

Source from the content-addressed store, hash-verified

685
686
687async def async_sendall(conn: PyMongoProtocol, buf: bytes) -> None:
688 try:
689 await asyncio.wait_for(conn.write(buf), timeout=conn.gettimeout)
690 except asyncio.TimeoutError as exc:
691 # Convert the asyncio.wait_for timeout error to socket.timeout which pool.py understands.
692 raise socket.timeout("timed out") from exc
693
694
695async def async_receive_message(

Callers 2

commandFunction · 0.90
send_messageMethod · 0.90

Calls 3

wait_forMethod · 0.80
writeMethod · 0.45
timeoutMethod · 0.45

Tested by

no test coverage detected