// 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.AspNet.Builder { /// /// Configuration options for the WebSocketMiddleware /// public class WebSocketOptions { public WebSocketOptions() { KeepAliveInterval = TimeSpan.FromMinutes(2); ReceiveBufferSize = 4 * 1024; ReplaceFeature = false; } /// /// 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; } /// /// Gets or sets if the middleware should replace the WebSocket implementation provided by /// a component earlier in the stack. This is false by default. /// public bool ReplaceFeature { get; set; } } }