< Summary

Information
Class: Ice.Internal.TcpBufSize
Assembly: Ice
File(s): /_/csharp/src/Ice/Internal/TcpBufSize.cs
Tag: 125_37167941578
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 27
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage
100%
Covered methods: 1
Fully covered methods: 1
Total methods: 1
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)50%22100%

File(s)

/_/csharp/src/Ice/Internal/TcpBufSize.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3namespace Ice.Internal;
 4
 5/// <summary>
 6/// The TCP send and receive buffer sizes, as configured by the Ice.TCP.SndSize and Ice.TCP.RcvSize properties.
 7/// </summary>
 8internal sealed class TcpBufSize
 9{
 10    internal int rcvSize { get; }
 11
 12    internal int sndSize { get; }
 13
 14    /// <summary>
 15    /// Initializes a new instance of the <see cref="TcpBufSize" /> class by reading the Ice.TCP.RcvSize and
 16    /// Ice.TCP.SndSize properties.
 17    /// </summary>
 18    /// <exception cref="PropertyException">Thrown when a property value is not a valid integer.</exception>
 119    internal TcpBufSize(Properties properties)
 20    {
 21        // By default, on Windows we use a 128KB buffer size. On Unix platforms, we use the system defaults.
 122        int dfltBufSize = AssemblyUtil.isWindows ? 128 * 1024 : 0;
 23
 124        rcvSize = properties.getPropertyAsIntWithDefault("Ice.TCP.RcvSize", dfltBufSize);
 125        sndSize = properties.getPropertyAsIntWithDefault("Ice.TCP.SndSize", dfltBufSize);
 126    }
 27}

Methods/Properties

.ctor(Ice.Properties)