Class KeepAlivePingAttribute
Specifies that the streaming response from the endpoint should automatically send a ping record (which requires no special client-side handling) whenever no item has been produced for the specified interval, keeping the response connection alive.
Inherited Members
Namespace: Singulink.Net.Http.Api.Service
Assembly: Singulink.Net.Http.Api.Service.dll
Syntax
[AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
public sealed class KeepAlivePingAttribute : Attribute
Remarks
This is only supported on endpoints that return IAsyncEnumerable<T> results, which are converted into streaming responses by UseApiResponseHandling<TBuilder>(TBuilder).
Constructors
| Name | Description |
|---|---|
| KeepAlivePingAttribute(double) | Initializes a new instance of the KeepAlivePingAttribute class. |
Properties
| Name | Description |
|---|---|
| Interval | Gets the minimum time to wait for the next item before a ping record is sent to the client. |