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

Method encode_end

gunicorn/dirty/protocol.py:274–286  ·  view source on GitHub ↗

Encode an end-of-stream message. Args: request_id: Request identifier this ends Returns: bytes: Complete message (header + empty payload)

(request_id: int)

Source from the content-addressed store, hash-verified

272
273 @staticmethod
274 def encode_end(request_id: int) -> bytes:
275 """
276 Encode an end-of-stream message.
277
278 Args:
279 request_id: Request identifier this ends
280
281 Returns:
282 bytes: Complete message (header + empty payload)
283 """
284 # End message has empty payload
285 header = BinaryProtocol.encode_header(MSG_TYPE_END, request_id, 0)
286 return header
287
288 @staticmethod
289 def encode_status(request_id: int) -> bytes:

Callers 2

_encode_from_dictMethod · 0.80

Calls 1

encode_headerMethod · 0.80

Tested by 1