Set default transport and application buffer sizes (#1964)
This commit is contained in:
parent
7563ccae20
commit
d4773e831c
|
|
@ -9,14 +9,18 @@ namespace Microsoft.AspNetCore.Http.Connections
|
||||||
{
|
{
|
||||||
public class HttpConnectionOptions
|
public class HttpConnectionOptions
|
||||||
{
|
{
|
||||||
|
// Selected because this is the default value of PipeWriter.PauseWriterThreshold.
|
||||||
|
// There maybe the opportunity for performance gains by tuning this default.
|
||||||
|
private const int DefaultPipeBufferSize = 32768;
|
||||||
|
|
||||||
public HttpConnectionOptions()
|
public HttpConnectionOptions()
|
||||||
{
|
{
|
||||||
AuthorizationData = new List<IAuthorizeData>();
|
AuthorizationData = new List<IAuthorizeData>();
|
||||||
Transports = HttpTransports.All;
|
Transports = HttpTransports.All;
|
||||||
WebSockets = new WebSocketOptions();
|
WebSockets = new WebSocketOptions();
|
||||||
LongPolling = new LongPollingOptions();
|
LongPolling = new LongPollingOptions();
|
||||||
TransportMaxBufferSize = 0;
|
TransportMaxBufferSize = DefaultPipeBufferSize;
|
||||||
ApplicationMaxBufferSize = 0;
|
ApplicationMaxBufferSize = DefaultPipeBufferSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IList<IAuthorizeData> AuthorizationData { get; }
|
public IList<IAuthorizeData> AuthorizationData { get; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue