Class ResolvedSessionPolicy
Read-only snapshot combining ProxyResourceLimits and ProxyTimeoutOptions into the single object H1/H2/H3/WebSocket subsystems are handed, so runtime mutation of either half cannot produce inconsistent enforcement partway through a request that started under a different combination of the two.
Per the plan's "Constraints on the policy layer" section, this type is deliberately inert: no back-pointer to ProxyServer, no service-locator lookup, no mutable fields, no static ambient accessor. Subsystems receive it as a constructor argument or method parameter only, so the dependency graph among consumers stays acyclic - the opposite of how ProxyServer itself is reached today.
Per the plan's "Two-phase policy resolution" section, a single resolution per connection is
not correct: SessionEventArgs.MaxBufferedBodyBytes is contractually settable from
BeforeRequest, and HTTP/3 already reads the request body before BeforeRequest
fires. This type does not itself perform either resolution phase - that is the
responsibility of the call sites introduced in later hardening-plan items, once there is a
real per-session override path to resolve against - but it is deliberately shaped so a
caller can hold one instance at headers-complete time (ResourceLimits's
framing/header-shape fields, which are never overridable) and, if a session lowers a body or
streaming budget in BeforeRequest, build a second instance via Create(ProxyResourceLimits, ProxyTimeoutOptions)
that shares the same Timeouts but substitutes a ProxyResourceLimits
reflecting the override, rather than mutating the first instance in place.
Inherited Members
Namespace: Titanium.Web.Proxy.Options
Assembly: Titanium.Web.Proxy.dll
Syntax
public sealed class ResolvedSessionPolicy
Properties
| Edit this page View SourceDefault
The Balanced profile: today's shipped resource limits and timeout defaults, unchanged
for existing traffic, per the plan's release-posture section.
Declaration
public static ResolvedSessionPolicy Default { get; }
Property Value
| Type | Description |
|---|---|
| ResolvedSessionPolicy |
ResourceLimits
Header shape, body/decompression budgets, and concurrency/abuse-rate ceilings.
Declaration
public ProxyResourceLimits ResourceLimits { get; }
Property Value
| Type | Description |
|---|---|
| ProxyResourceLimits |
Timeouts
Every deadline composed for a request's lifetime.
Declaration
public ProxyTimeoutOptions Timeouts { get; }
Property Value
| Type | Description |
|---|---|
| ProxyTimeoutOptions |
Methods
| Edit this page View SourceCreate(ProxyResourceLimits, ProxyTimeoutOptions)
Combines an already-validated ProxyResourceLimits and ProxyTimeoutOptions pair into one snapshot. Both halves are validated by their own constructors already; this constructor only rejects a missing half so a snapshot can never be built with one side implicitly defaulted to null.
Declaration
public static ResolvedSessionPolicy Create(ProxyResourceLimits resourceLimits, ProxyTimeoutOptions timeouts)
Parameters
| Type | Name | Description |
|---|---|---|
| ProxyResourceLimits | resourceLimits | |
| ProxyTimeoutOptions | timeouts |
Returns
| Type | Description |
|---|---|
| ResolvedSessionPolicy |
WithResourceLimits(ProxyResourceLimits)
Returns a snapshot sharing this instance's Timeouts but with
ResourceLimits replaced - the shape a post-BeforeRequest per-session
override takes: a new immutable snapshot, never a mutation of the headers-complete one that
framing decisions upstream may still be holding a reference to.
Declaration
public ResolvedSessionPolicy WithResourceLimits(ProxyResourceLimits resourceLimits)
Parameters
| Type | Name | Description |
|---|---|---|
| ProxyResourceLimits | resourceLimits |
Returns
| Type | Description |
|---|---|
| ResolvedSessionPolicy |