< Summary

Information
Class: Renci.SshNet.Connection.SocketFactory
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Connection\SocketFactory.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 26
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 Line coverage
Create(...)100%1100%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Connection\SocketFactory.cs

#LineLine coverage
 1using System.Net.Sockets;
 2
 3namespace Renci.SshNet.Connection
 4{
 5    /// <summary>
 6    /// Represents a factory to create <see cref="Socket"/> instances.
 7    /// </summary>
 8    internal sealed class SocketFactory : ISocketFactory
 9    {
 10        /// <summary>
 11        /// Creates a <see cref="Socket"/> with the specified <see cref="AddressFamily"/>,
 12        /// <see cref="SocketType"/> and <see cref="ProtocolType"/> that does not use the
 13        /// <c>Nagle</c> algorithm.
 14        /// </summary>
 15        /// <param name="addressFamily">The <see cref="AddressFamily"/>.</param>
 16        /// <param name="socketType">The <see cref="SocketType"/>.</param>
 17        /// <param name="protocolType">The <see cref="ProtocolType"/>.</param>
 18        /// <returns>
 19        /// The <see cref="Socket"/>.
 20        /// </returns>
 21        public Socket Create(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
 226422        {
 226423            return new Socket(addressFamily, socketType, protocolType) { NoDelay = true };
 226424        }
 25    }
 26}