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

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(string host, int port, TimeSpan timeout)

Establishes a socket connection to the specified host and port.

protected Task<Socket> SocketConnectAsync(string host, int port, CancellationToken cancellationToken)

Establishes a socket connection to the specified host and port.