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

SshData

public abstract class SshData
Base ssh data serialization type
protected virtual int BufferCapacity { get; }

Gets the size of the message in bytes.

protected SshDataStream DataStream { get; }

Gets the underlying SshDataStream that is used for reading and writing SSH data.

protected bool IsEndOfData { get; }

Gets a value indicating whether all data from the buffer has been read.

protected virtual int ZeroReaderIndex { get; }

Gets the index that represents zero in current data type.

protected SshData()

public byte[] GetBytes()

Gets data bytes array

public void Load(byte[] value)

Loads data from specified bytes.

public void Load(byte[] value, int offset)

Loads data from the specified buffer.

protected void LoadBytes(byte[] bytes)

Loads data bytes into internal buffer.

protected void LoadBytes(byte[] bytes, int offset)

Loads data bytes into internal buffer.

protected abstract void LoadData()

Called when type specific data need to be loaded.

protected byte[] ReadBinary()

Reads next data type as byte array from internal buffer.

protected bool ReadBoolean()

Reads next boolean data type from internal buffer.

protected byte ReadByte()

Reads next byte data type from internal buffer.

protected byte[] ReadBytes()

Reads all data left in internal buffer at current position.

protected byte[] ReadBytes(int length)

Reads next specified number of bytes data type from internal buffer.

protected IDictionary<string, string> ReadExtensionPair()

Reads next extension-pair data type from internal buffer.

protected string[] ReadNamesList()

Reads next name-list data type from internal buffer.

protected string ReadString(Encoding encoding)

Reads next string data type from internal buffer using the specific encoding.

protected ushort ReadUInt16()

Reads next uint16 data type from internal buffer.

protected uint ReadUInt32()

Reads next uint32 data type from internal buffer.

protected ulong ReadUInt64()

Reads next uint64 data type from internal buffer.

protected void ResetReader()

Resets internal data reader index.

protected abstract void SaveData()

Called when type specific data need to be saved.

protected void Write(byte[] data)

Writes bytes array data into internal buffer.

protected void Write(byte[] buffer, int offset, int count)

Writes a sequence of bytes to the current SSH data stream and advances the current position within this stream by the number of bytes written.

protected void Write(byte data)

Writes Byte data into internal buffer.

protected void Write(bool data)

Writes Boolean into internal buffer.

protected void Write(uint data)

Writes UInt32 data into internal buffer.

protected void Write(ulong data)

Writes UInt64 data into internal buffer.

protected void Write(string data)

Writes String data into internal buffer using default encoding.

protected void Write(string data, Encoding encoding)

Writes String data into internal buffer using the specified encoding.

protected void Write(BigInteger data)

Writes mpint data into internal buffer.

protected void Write(string[] data)

Writes name-list data into internal buffer.

protected void Write(IDictionary<string, string> data)

Writes extension-pair data into internal buffer.

protected void WriteBinary(byte[] buffer, int offset, int count)

Writes data into internal buffer.

protected void WriteBinaryString(byte[] buffer)

Writes data into internal buffer.

protected virtual void WriteBytes(SshDataStream stream)

Writes the current message to the specified SshDataStream.