<PackageReference Include="SSH.NET" Version="2024.1.0" />

ConnectorBase

abstract class ConnectorBase : IConnector
protected ConnectorBase(ISocketFactory socketFactory)

protected static int SocketRead(Socket socket, byte[] buffer, int offset, int length)

Performs a blocking read on the socket until length bytes are received.

protected static int SocketRead(Socket socket, byte[] buffer, int offset, int length, TimeSpan readTimeout)

Performs a blocking read on the socket until length bytes are received.

protected static byte SocketReadByte(Socket socket)

protected static byte SocketReadByte(Socket socket, TimeSpan readTimeout)

public abstract Socket Connect(IConnectionInfo connectionInfo)

public abstract Task<Socket> ConnectAsync(IConnectionInfo connectionInfo, CancellationToken cancellationToken)

protected Socket SocketConnect(EndPoint endPoint, TimeSpan timeout)

Establishes a socket connection to the specified endpoint.

protected Task<Socket> SocketConnectAsync(EndPoint endPoint, CancellationToken cancellationToken)

Establishes a socket connection to the specified endpoint.