Class TransportLimits

java.lang.Object
dev.relism.flash.transport.TransportLimits

public final class TransportLimits extends Object
Transport-level bound on concurrent connections, enforced by ConnectionRunner before any per-connection state (TLS handshake, protocol negotiation, HPACK tables, buffers) is set up. Unlike Http2Limits (bounds on what one already-admitted connection may do), this bounds how many connections are admitted at all — the guard a stress test found completely absent: AcceptLoop accepted unconditionally, so a connection flood ran the JVM out of heap rather than being turned away.
  • Method Details

    • defaultMaxConnections

      public static int defaultMaxConnections()
      Auto-scaled default for FlashConfiguration#getMaxConnections(). Computed from Runtime.maxMemory() so the same default protects a 256 MiB container and an 8 GiB one without operator input; set maxConnections explicitly to override it, or to 0 to disable the check (unlimited — the behavior every version before this had unconditionally).