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

SocketAbstraction

static class SocketAbstraction
public static bool CanRead(Socket socket)

public static bool CanWrite(Socket socket)

Returns a value indicating whether the specified Socket can be used to send data.

public static void ClearReadBuffer(Socket socket)

public static Socket Connect(IPEndPoint remoteEndpoint, TimeSpan connectTimeout)

public static void Connect(Socket socket, IPEndPoint remoteEndpoint, TimeSpan connectTimeout)

public static bool IsErrorResumable(SocketError socketError)

public static byte[] Read(Socket socket, int size, TimeSpan timeout)

Receives data from a bound Socket.

public static int Read(Socket socket, byte[] buffer, int offset, int size, TimeSpan readTimeout)

Receives data from a bound Socket into a receive buffer.

public static int ReadByte(Socket socket, TimeSpan timeout)

Reads a byte from the specified Socket.

public static void ReadContinuous(Socket socket, byte[] buffer, int offset, int size, Action<byte[], int, int> processReceivedBytesAction)

public static int ReadPartial(Socket socket, byte[] buffer, int offset, int size, TimeSpan timeout)

public static void Send(Socket socket, byte[] data)

public static void Send(Socket socket, byte[] data, int offset, int size)

public static void SendByte(Socket socket, byte value)

Sends a byte using the specified Socket.