Class RequestLimiterHandler
Rejects the request if the request count (made by a remote client) excceeds the threshold.
Implements
Inherited Members
Namespace: Solti.Utils.Rpc.Pipeline
Assembly: Solti.Utils.Rpc.Server.dll
Syntax
public class RequestLimiterHandler : RequestHandlerBase<IRequestLimiterHandlerConfig>, IRequestHandler
Constructors
RequestLimiterHandler(IRequestHandler, IRequestLimiterHandlerConfig)
Creates a new RequestLimiterHandler instance.
Declaration
public RequestLimiterHandler(IRequestHandler next, IRequestLimiterHandlerConfig config)
Parameters
Type | Name | Description |
---|---|---|
IRequestHandler | next | |
IRequestLimiterHandlerConfig | config |
Remarks
This handler requires a next
value to be supplied.
Methods
HandleAsync(IInjector, IHttpSession, CancellationToken)
Does some handler specific work.
Declaration
public override Task HandleAsync(IInjector scope, IHttpSession context, CancellationToken cancellation)
Parameters
Type | Name | Description |
---|---|---|
Solti.Utils.DI.Interfaces.IInjector | scope | |
IHttpSession | context | |
CancellationToken | cancellation |
Returns
Type | Description |
---|---|
Task |
Overrides
Solti.Utils.Rpc.Pipeline.RequestHandlerBase<Solti.Utils.Rpc.Pipeline.IRequestLimiterHandlerConfig>.HandleAsync(Solti.Utils.DI.Interfaces.IInjector, Solti.Utils.Rpc.Interfaces.IHttpSession, System.Threading.CancellationToken)