MCPcopy
hub / github.com/benoitc/gunicorn / write_message_async

Method write_message_async

gunicorn/ctl/protocol.py:159–169  ·  view source on GitHub ↗

Write one message to an async writer. Args: writer: asyncio StreamWriter data: Message dictionary to send

(writer, data: dict)

Source from the content-addressed store, hash-verified

157
158 @staticmethod
159 async def write_message_async(writer, data: dict):
160 """
161 Write one message to an async writer.
162
163 Args:
164 writer: asyncio StreamWriter
165 data: Message dictionary to send
166 """
167 message = ControlProtocol.encode_message(data)
168 writer.write(message)
169 await writer.drain()
170
171
172def make_request(request_id: int, command: str, args: list = None) -> dict:

Callers 5

_handle_clientMethod · 0.45
mock_executeMethod · 0.45
handlerMethod · 0.45
test_async_read_writeMethod · 0.45

Calls 3

encode_messageMethod · 0.80
writeMethod · 0.45
drainMethod · 0.45

Tested by 4

mock_executeMethod · 0.36
handlerMethod · 0.36
test_async_read_writeMethod · 0.36