Table of Contents

Class DeadlineMiddleware

Namespace
IceRpc.Deadline
Assembly
IceRpc.Deadline.dll

Represents a middleware that decodes deadline fields into deadline features. When the decoded deadline expires, this middleware cancels the dispatch and returns an OutgoingResponse with status code DeadlineExceeded.

public class DeadlineMiddleware : IDispatcher
Inheritance
DeadlineMiddleware
Implements
Inherited Members

Constructors

DeadlineMiddleware(IDispatcher)

Constructs a deadline middleware.

public DeadlineMiddleware(IDispatcher next)

Parameters

next IDispatcher

The next dispatcher in the dispatch pipeline.

Methods

DispatchAsync(IncomingRequest, CancellationToken)

Dispatches an incoming request and returns the corresponding outgoing response.

public ValueTask<OutgoingResponse> DispatchAsync(IncomingRequest request, CancellationToken cancellationToken = default)

Parameters

request IncomingRequest

The incoming request being dispatched.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

ValueTask<OutgoingResponse>

The corresponding OutgoingResponse.

See Also