IChannelDirectTcpip.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using System.Net.Sockets;
  3. namespace Renci.SshNet.Channels
  4. {
  5. /// <summary>
  6. /// A "direct-tcpip" SSH channel.
  7. /// </summary>
  8. internal interface IChannelDirectTcpip : IDisposable
  9. {
  10. /// <summary>
  11. /// Gets a value indicating whether this channel is open.
  12. /// </summary>
  13. /// <value>
  14. /// <c>true</c> if this channel is open; otherwise, <c>false</c>.
  15. /// </value>
  16. bool IsOpen { get; }
  17. /// <summary>
  18. /// Opens a channel for a locally forwarded TCP/IP port.
  19. /// </summary>
  20. /// <param name="remoteHost">The name of the remote host to forward to.</param>
  21. /// <param name="port">The port of the remote hosts to forward to.</param>
  22. /// <param name="forwardedPort">The forwarded port for which the channel is opened.</param>
  23. /// <param name="socket">The socket to receive requests from, and send responses from the remote host to.</param>
  24. void Open(string remoteHost, uint port, IForwardedPort forwardedPort, Socket socket);
  25. /// <summary>
  26. /// Binds the channel to the remote host.
  27. /// </summary>
  28. void Bind();
  29. /// <summary>
  30. /// Closes the channel.
  31. /// </summary>
  32. void Close();
  33. }
  34. }