Commit c9456370 authored by jan.koester's avatar jan.koester
Browse files

test

parent 5227fa34
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2329,6 +2329,7 @@ void quic::accept(std::unique_ptr<socket>& csock, bool nonblock) {
    child_ptr->_parent = this;               // Link to parent for routing
    child_ptr->_stream_callback = _stream_callback;  // Copy stream callback
    child_ptr->_incremental_stream_dispatch = _incremental_stream_dispatch;
    if (_start_dispatch_promoted) child_ptr->_dispatch_promoted.store(true);
    child_ptr->_pmtud_ceiling = _pmtud_ceiling;       // Copy PMTU discovery ceiling

    // Generate our own connection ID for the client to use
+15 −0
Original line number Diff line number Diff line
@@ -766,6 +766,20 @@ namespace netplus {
		// across calls (or opt out and keep today's behavior).
		void setIncrementalStreamDispatch(bool enable) { _incremental_stream_dispatch = enable; }

		// Opt-in, default off: seed every accepted child connection's
		// _dispatch_promoted as already true, instead of waiting for its
		// first dispatch to be observed slower than kSlowDispatchThreshold.
		// Without this, a connection's very first stream callback always
		// runs inline on the thread demuxing every other connection's
		// packets too (see scheduleDispatches()) — fine for callbacks that
		// never block, but a server whose message handlers do blocking I/O
		// (e.g. writing a large block to disk) can stall unrelated
		// connections' traffic for that first call's whole duration. Set
		// this when the handler's cost can't be bounded below the
		// threshold ahead of time, so no connection ever pays that cost
		// inline even once.
		void setStartDispatchPromoted(bool enable) { _start_dispatch_promoted = enable; }

		// Congestion control strategy for this connection. Default
		// (NewReno) is the existing, unchanged RFC-9002-conformant AIMD
		// behavior. BbrLite is an experimental, opt-in bandwidth-delay-
@@ -1484,6 +1498,7 @@ namespace netplus {
		using QuicStreamCallback = std::function<void(quic*, uint64_t, const std::vector<uint8_t>&, bool)>;
		QuicStreamCallback _stream_callback;
		bool _incremental_stream_dispatch = false; // see setIncrementalStreamDispatch()
		bool _start_dispatch_promoted = false; // see setStartDispatchPromoted()

		// Deferred stream dispatches — filled inside _quic_mutex,
		// invoked AFTER releasing it so callbacks can't block the