Class ProxyTimeoutOptions
Immutable, validated snapshot of every deadline the proxy enforces across a request's
lifetime, expressed consistently as TimeSpan rather than the mixture of
"seconds as int" properties this replaces
(ConnectionTimeOutSeconds, ConnectTimeOutSeconds, ...). A deadline that can be
legitimately unbounded is nullable, with null meaning "no deadline" as an
explicit state rather than Zero or a magic sentinel duration.
This type only holds values; it does not decide which deadline fired first when several are composed for one request. That is the responsibility of the per-request deadline registry described in the plan's "Deadline composition" section, introduced alongside the header-parsing deadlines in a later item so it can be exercised by a real caller instead of landing as unused scaffolding.
Inherited Members
Namespace: Titanium.Web.Proxy.Options
Assembly: Titanium.Web.Proxy.dll
Syntax
public sealed class ProxyTimeoutOptions
Properties
| Edit this page View SourceCallbackTimeout
Deadline after which a user callback (BeforeRequest, BeforeResponse, etc.) that
has not returned is abandoned and reported as orphaned. null means
callbacks are never timed out - not recommended, since .NET cannot forcibly stop an
uncooperative callback and this is the only backstop against one hanging a connection
indefinitely.
Declaration
public TimeSpan? CallbackTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan? |
ClientHeaderTimeout
Deadline for a client to finish sending the request line and headers.
Declaration
public TimeSpan ClientHeaderTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
ConnectTimeout
Deadline for establishing the upstream TCP (and TLS, where applicable) connection.
Declaration
public TimeSpan ConnectTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Default
Today's shipped values, carried forward per the plan's rollout section: 60-second connection timeout, 20-second connect timeout. Deadlines newly introduced by the hardening plan (client-header, response-header, callback, drain, stream, total-request) are set to conservative values pending benchmark-driven tuning.
Declaration
public static ProxyTimeoutOptions Default { get; }
Property Value
| Type | Description |
|---|---|
| ProxyTimeoutOptions |
DrainTimeout
Deadline for draining a connection's in-flight work during an orderly shutdown.
Declaration
public TimeSpan DrainTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
IdleReadTimeout
Deadline for a single read to make forward progress once a connection is established.
Declaration
public TimeSpan IdleReadTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
IdleWriteTimeout
Deadline for a single write to make forward progress once a connection is established.
Declaration
public TimeSpan IdleWriteTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
ResponseHeaderTimeout
Deadline for the origin to finish sending the response status line and headers.
Declaration
public TimeSpan ResponseHeaderTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
StreamTimeout
Deadline for a single HTTP/2 or HTTP/3 stream to complete once opened. null disables the per-stream deadline.
Declaration
public TimeSpan? StreamTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan? |
TotalRequestTimeout
Deadline for an entire request/response exchange, end to end. null disables the total-request deadline.
Declaration
public TimeSpan? TotalRequestTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan? |
Methods
| Edit this page View SourceCreate(TimeSpan, TimeSpan, TimeSpan, TimeSpan, TimeSpan, TimeSpan?, TimeSpan, TimeSpan?, TimeSpan?)
Validates and constructs a ProxyTimeoutOptions snapshot. Every supplied duration - including a nullable one, when present - must be strictly positive.
Declaration
public static ProxyTimeoutOptions Create(TimeSpan clientHeaderTimeout, TimeSpan connectTimeout, TimeSpan responseHeaderTimeout, TimeSpan idleReadTimeout, TimeSpan idleWriteTimeout, TimeSpan? callbackTimeout, TimeSpan drainTimeout, TimeSpan? streamTimeout, TimeSpan? totalRequestTimeout)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | clientHeaderTimeout | |
| TimeSpan | connectTimeout | |
| TimeSpan | responseHeaderTimeout | |
| TimeSpan | idleReadTimeout | |
| TimeSpan | idleWriteTimeout | |
| TimeSpan? | callbackTimeout | |
| TimeSpan | drainTimeout | |
| TimeSpan? | streamTimeout | |
| TimeSpan? | totalRequestTimeout |
Returns
| Type | Description |
|---|---|
| ProxyTimeoutOptions |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | A supplied duration is zero or negative. |