// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; namespace Microsoft.AspNetCore.Builder { /// /// Configuration options for the WebSocketMiddleware /// public class WebSocketOptions { public WebSocketOptions() { KeepAliveInterval = TimeSpan.FromMinutes(2); ReceiveBufferSize = 4 * 1024; } /// /// Gets or sets the frequency at which to send Ping/Pong keep-alive control frames. /// The default is two minutes. /// public TimeSpan KeepAliveInterval { get; set; } /// /// Gets or sets the size of the protocol buffer used to receive and parse frames. /// The default is 4kb. /// public int ReceiveBufferSize { get; set; } } }