IConnectionInfo.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Renci.SshNet.Common;
  5. using Renci.SshNet.Messages.Connection;
  6. namespace Renci.SshNet
  7. {
  8. /// <summary>
  9. /// Represents remote connection information.
  10. /// </summary>
  11. internal interface IConnectionInfo
  12. {
  13. /// <summary>
  14. /// Gets the timeout to used when waiting for a server to acknowledge closing a channel.
  15. /// </summary>
  16. /// <value>
  17. /// The channel close timeout. The default value is 1 second.
  18. /// </value>
  19. /// <remarks>
  20. /// If a server does not send a <c>SSH2_MSG_CHANNEL_CLOSE</c> message before the specified timeout
  21. /// elapses, the channel will be closed immediately.
  22. /// </remarks>
  23. TimeSpan ChannelCloseTimeout { get; }
  24. /// <summary>
  25. /// Gets the supported channel requests for this connection.
  26. /// </summary>
  27. /// <value>
  28. /// The supported channel requests for this connection.
  29. /// </value>
  30. IDictionary<string, RequestInfo> ChannelRequests { get; }
  31. /// <summary>
  32. /// Gets the character encoding.
  33. /// </summary>
  34. /// <value>
  35. /// The character encoding.
  36. /// </value>
  37. Encoding Encoding { get; }
  38. /// <summary>
  39. /// Gets connection host.
  40. /// </summary>
  41. /// <value>
  42. /// The connection host.
  43. /// </value>
  44. string Host { get; }
  45. /// <summary>
  46. /// Gets connection port.
  47. /// </summary>
  48. /// <value>
  49. /// The connection port. The default value is 22.
  50. /// </value>
  51. int Port { get; }
  52. /// <summary>
  53. /// Gets proxy type.
  54. /// </summary>
  55. /// <value>
  56. /// The type of the proxy.
  57. /// </value>
  58. ProxyTypes ProxyType { get; }
  59. /// <summary>
  60. /// Gets proxy connection host.
  61. /// </summary>
  62. string ProxyHost { get; }
  63. /// <summary>
  64. /// Gets proxy connection port.
  65. /// </summary>
  66. int ProxyPort { get; }
  67. /// <summary>
  68. /// Gets proxy connection username.
  69. /// </summary>
  70. string ProxyUsername { get; }
  71. /// <summary>
  72. /// Gets proxy connection password.
  73. /// </summary>
  74. string ProxyPassword { get; }
  75. /// <summary>
  76. /// Gets the number of retry attempts when session channel creation failed.
  77. /// </summary>
  78. /// <value>
  79. /// The number of retry attempts when session channel creation failed.
  80. /// </value>
  81. int RetryAttempts { get; }
  82. /// <summary>
  83. /// Gets the connection timeout.
  84. /// </summary>
  85. /// <value>
  86. /// The connection timeout. The default value is 30 seconds.
  87. /// </value>
  88. TimeSpan Timeout { get; }
  89. /// <summary>
  90. /// Occurs when authentication banner is sent by the server.
  91. /// </summary>
  92. event EventHandler<AuthenticationBannerEventArgs> AuthenticationBanner;
  93. }
  94. }