You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce a configurable FlushPolicy to control when the TLS layer flushes its
underlying transport.
This change adds a FlushPolicy enum (Relaxed or Strict) and wires it into TlsConnection
and TlsWriter. The policy determines whether the transport’s flush() is called after
writing a TLS record.
With Strict (the default), the transport is always flushed, ensuring that data is acknowledged
or committed before continuing. This mode is compatible with existing behavior.
With Relaxed, the TLS layer closes the record and hands bytes to the transport without
forcing a flush, allowing buffered writes to improve performance and reduce latency.
This gives callers explicit control over how aggressively the transport flushes data.
It's particularly important for transports like embassy-net TCP, where flush() blocks
waiting for ACKs. The default remains Strict to preserve compatibility with embedded-tls 0.17.0,
while the Relaxed mode can be selected together with larger socket window for improved throughput.
0 commit comments