< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Channels.WebSocketDefaults
Assembly: CoreWCF.Http
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Http/src/CoreWCF/Channels/TransportDefaults.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 69
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.cctor()100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Http/src/CoreWCF/Channels/TransportDefaults.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4using System;
 5using System.Net;
 6using System.Net.WebSockets;
 7
 8namespace CoreWCF.Channels
 9{
 10    internal static class TransportDefaults
 11    {
 12        internal const long MaxReceivedMessageSize = 65536;
 13        internal const int MaxBufferSize = (int)MaxReceivedMessageSize;
 14        internal const bool RequireClientCertificate = false;
 15    }
 16
 17    public static class BasicHttpBindingDefaults
 18    {
 19        public const WSMessageEncoding MessageEncoding = WSMessageEncoding.Text;
 20    }
 21
 22    internal static class HttpTransportDefaults
 23    {
 24        internal const AuthenticationSchemes AuthenticationScheme = AuthenticationSchemes.Anonymous;
 25        internal const TransferMode TransferMode = CoreWCF.TransferMode.Buffered;
 26        internal const bool KeepAliveEnabled = true;
 27        internal const string Realm = "";
 28
 29        internal static WebSocketTransportSettings GetDefaultWebSocketTransportSettings()
 30        {
 31            return new WebSocketTransportSettings();
 32        }
 33    }
 34
 35    internal static class ConnectionOrientedTransportDefaults
 36    {
 37        internal const int ConnectionBufferSize = 8192;
 38    }
 39
 40    internal static class WebSocketDefaults
 41    {
 42        internal const WebSocketTransportUsage TransportUsage = WebSocketTransportUsage.Never;
 43        internal const bool CreateNotificationOnConnection = false;
 544        internal static readonly TimeSpan DefaultKeepAliveInterval = TimeSpan.FromSeconds(0);
 45
 46        internal const int BufferSize = 16 * 1024;
 47        internal const int MinReceiveBufferSize = 256;
 48        internal const int MinSendBufferSize = 16;
 49        internal const bool DisablePayloadMasking = false;
 50        internal const WebSocketMessageType DefaultWebSocketMessageType = WebSocketMessageType.Binary;
 51        internal const string SubProtocol = null;
 52
 53        internal const int DefaultMaxPendingConnections = 0;
 54        // We set this number larger than that in TCP transport because in WebSocket cases, the connection is already au
 55        // after we create the half-open channel. The default value is set as the default one as MaxConcurrentSessions t
 56        // well in burst scenarios.
 57        internal const int DefaultMaxConcurrentSessions = 100;
 558        internal static readonly int MaxPendingConnectionsCpuCount = DefaultMaxConcurrentSessions * Environment.Processo
 59
 60        internal const string WebSocketConnectionHeaderValue = "Upgrade";
 61        internal const string WebSocketUpgradeHeaderValue = "websocket";
 62    }
 63
 64    internal static class NetHttpBindingDefaults
 65    {
 66        internal const NetHttpMessageEncoding MessageEncoding = NetHttpMessageEncoding.Binary;
 67        internal const WebSocketTransportUsage TransportUsage = WebSocketTransportUsage.WhenDuplex;
 68    }
 69}

Methods/Properties

.cctor()