< Summary

Information
Class: Renci.SshNet.Channels.ServerChannel
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Channels\ServerChannel.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 39
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
.ctor(...)100%1100%
SendMessage(...)100%1100%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Channels\ServerChannel.cs

#LineLine coverage
 1using Renci.SshNet.Messages.Connection;
 2
 3namespace Renci.SshNet.Channels
 4{
 5    internal abstract class ServerChannel : Channel
 6    {
 7        /// <summary>
 8        /// Initializes a new instance of the <see cref="ServerChannel"/> class.
 9        /// </summary>
 10        /// <param name="session">The session.</param>
 11        /// <param name="localChannelNumber">The local channel number.</param>
 12        /// <param name="localWindowSize">Size of the window.</param>
 13        /// <param name="localPacketSize">Size of the packet.</param>
 14        /// <param name="remoteChannelNumber">The remote channel number.</param>
 15        /// <param name="remoteWindowSize">The window size of the remote party.</param>
 16        /// <param name="remotePacketSize">The maximum size of a data packet that we can send to the remote party.</para
 17        protected ServerChannel(ISession session,
 18                                uint localChannelNumber,
 19                                uint localWindowSize,
 20                                uint localPacketSize,
 21                                uint remoteChannelNumber,
 22                                uint remoteWindowSize,
 23                                uint remotePacketSize)
 1724            : base(session, localChannelNumber, localWindowSize, localPacketSize)
 1725        {
 1726            InitializeRemoteInfo(remoteChannelNumber, remoteWindowSize, remotePacketSize);
 1727        }
 28
 29        protected void SendMessage(ChannelOpenConfirmationMessage message)
 1730        {
 31            // No need to check whether channel is open when trying to open a channel
 1732            Session.SendMessage(message);
 33
 34            // When we act as server, consider the channel open when we've sent the
 35            // confirmation message to the peer
 1736            IsOpen = true;
 1737        }
 38    }
 39}