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

Method write

pymongo/network_layer.py:514–519  ·  view source on GitHub ↗

Write a message to this connection's transport.

(self, message: bytes)

Source from the content-addressed store, hash-verified

512 self.transport.set_write_buffer_limits(MAX_MESSAGE_SIZE, MAX_MESSAGE_SIZE)
513
514 async def write(self, message: bytes) -> None:
515 """Write a message to this connection's transport."""
516 if self.transport.is_closing():
517 raise OSError("Connection is closed")
518 self.transport.write(message)
519 self.transport.resume_reading()
520
521 async def read(self, request_id: Optional[int], max_message_size: int) -> tuple[bytes, int]:
522 """Read a single MongoDB Wire Protocol message from this connection."""

Callers 6

async_sendallFunction · 0.45
_batched_op_msg_implFunction · 0.45
_batched_op_msgFunction · 0.45
_client_construct_op_msgFunction · 0.45
_client_batched_op_msgFunction · 0.45

Calls 1

is_closingMethod · 0.45

Tested by

no test coverage detected