Skip to main content

Module pending_stdin

Module pending_stdin 

Source
Expand description

The stdin of a client which waits for the container, see PendingStdin.

Structsยง

PendingStdin ๐Ÿ”’
Stdin of a client which the container did not take yet, bounded by PENDING_STDIN_MAX_BYTES. Small stdin gets merged and large stdin split into entries of at most STDIN_CHUNK_SIZE, each counts STDIN_ENTRY_OVERHEAD on top of its bytes. Empty stdin carries nothing, and nothing takes stdin after the close, both get dropped. The entries of large stdin keep its message until the container took the last one, stdin goes to the container in order, so only the oldest message is partly taken.

Constantsยง

STDIN_CHUNK_SIZE ๐Ÿ”’
The largest part of stdin which goes towards the container at once. Larger stdin gets split without copying it, so that the channels on the way, which count entries, hold at most this much per entry.
STDIN_ENTRY_OVERHEAD ๐Ÿ”’
What an entry of the pending stdin counts on top of its bytes.
STDIN_MERGE_SIZE ๐Ÿ”’
Stdin smaller than this gets merged with the stdin before it while it waits, so that a client which sends a byte per message does not make the server hold far more than the bytes it counts.