using System;
using System.Net.Sockets;
namespace Renci.SshNet.Channels
{
    /// 
    /// A "direct-tcpip" SSH channel.
    /// 
    internal interface IChannelDirectTcpip : IDisposable
    {
        /// 
        /// Gets a value indicating whether this channel is open.
        /// 
        /// 
        /// true if this channel is open; otherwise, false.
        /// 
        bool IsOpen { get; }
        /// 
        /// Opens a channel for a locally forwarded TCP/IP port.
        /// 
        /// The name of the remote host to forward to.
        /// The port of the remote hosts to forward to.
        /// The forwarded port for which the channel is opened.
        /// The socket to receive requests from, and send responses from the remote host to.
        void Open(string remoteHost, uint port, IForwardedPort forwardedPort, Socket socket);
        /// 
        /// Binds the channel to the remote host.
        /// 
        void Bind();
        /// 
        /// Closes the channel.
        /// 
        void Close();
    }
}