-
-
Notifications
You must be signed in to change notification settings - Fork 978
Expand file tree
/
Copy pathIConnector.cs
More file actions
31 lines (29 loc) · 1.41 KB
/
IConnector.cs
File metadata and controls
31 lines (29 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Net.Sockets;
using System.Threading;
namespace Renci.SshNet.Connection
{
/// <summary>
/// Represents a means to connect to a SSH endpoint.
/// </summary>
internal interface IConnector : IDisposable
{
/// <summary>
/// Connects to a SSH endpoint using the specified <see cref="IConnectionInfo"/>.
/// </summary>
/// <param name="connectionInfo">The <see cref="IConnectionInfo"/> to use to establish a connection to a SSH endpoint.</param>
/// <returns>
/// A <see cref="Socket"/> connected to the SSH endpoint represented by the specified <see cref="IConnectionInfo"/>.
/// </returns>
Socket Connect(IConnectionInfo connectionInfo);
/// <summary>
/// Asynchronously connects to a SSH endpoint using the specified <see cref="IConnectionInfo"/>.
/// </summary>
/// <param name="connectionInfo">The <see cref="IConnectionInfo"/> to use to establish a connection to a SSH endpoint.</param>
/// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
/// <returns>
/// A <see cref="Socket"/> connected to the SSH endpoint represented by the specified <see cref="IConnectionInfo"/>.
/// </returns>
System.Threading.Tasks.Task<Socket> ConnectAsync(IConnectionInfo connectionInfo, CancellationToken cancellationToken);
}
}