From 01e9101543906ffd39239efd2f7bb41dbd879902 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Mon, 13 Jun 2016 15:23:38 -0700 Subject: [PATCH] Add more doc comments to KestrelServerOptions --- .../KestrelServerOptions.cs | 43 +++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServerOptions.cs b/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServerOptions.cs index 3591408bbb..6ae42f48a8 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServerOptions.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServerOptions.cs @@ -6,6 +6,9 @@ using Microsoft.AspNetCore.Server.Kestrel.Filter; namespace Microsoft.AspNetCore.Server.Kestrel { + /// + /// Provides programmatic configuration of Kestrel-specific features. + /// public class KestrelServerOptions { // Matches the default client_max_body_size in nginx. Also large enough that most requests @@ -15,16 +18,35 @@ namespace Microsoft.AspNetCore.Server.Kestrel /// /// Gets or sets whether the Server header should be included in each response. /// + /// + /// Defaults to true. + /// public bool AddServerHeader { get; set; } = true; + /// + /// Enables the UseKestrel options callback to resolve and use services registered by the application during startup. + /// Typically initialized by . + /// public IServiceProvider ApplicationServices { get; set; } + /// + /// Gets or sets an that allows each connection + /// to be intercepted and transformed. + /// Configured by the UseHttps() and + /// extension methods. + /// + /// + /// Defaults to null. + /// public IConnectionFilter ConnectionFilter { get; set; } /// - /// Maximum size of the request buffer. Default is 1,048,576 bytes (1 MB). + /// Maximum size of the request buffer. /// If value is null, the size of the request buffer is unlimited. /// + /// + /// Defaults to 1,048,576 bytes (1 MB). + /// public long? MaxRequestBufferSize { get @@ -41,15 +63,30 @@ namespace Microsoft.AspNetCore.Server.Kestrel } } + /// + /// Set to false to enable Nagle's algorithm for all connections. + /// + /// + /// Defaults to true. + /// public bool NoDelay { get; set; } = true; /// /// The amount of time after the server begins shutting down before connections will be forcefully closed. - /// By default, Kestrel will wait 5 seconds for any ongoing requests to complete before terminating - /// the connection. + /// Kestrel will wait for the duration of the timeout for any ongoing request processing to complete before + /// terminating the connection. No new connections or requests will be accepted during this time. /// + /// + /// Defaults to 5 seconds. + /// public TimeSpan ShutdownTimeout { get; set; } = TimeSpan.FromSeconds(5); + /// + /// The number of libuv I/O threads used to process requests. + /// + /// + /// Defaults to half of rounded down and clamped between 1 and 16. + /// public int ThreadCount { get; set; } = ProcessorThreadCount; private static int ProcessorThreadCount