Skip to content

Conversation

@Rob-Hague
Copy link
Collaborator

SshDataStream is a MemoryStream, so we can access the buffer directly. Also simplify some usage in PrivateKeyFile.

SshDataStream is a MemoryStream, so we can access the buffer directly.
Also simplify some usage in PrivateKeyFile.
/// Reads a length-prefixed byte array from the SSH data stream,
/// returned as a view over the underlying buffer.
/// </summary>
internal ArraySegment<byte> ReadBinarySegment()
Copy link
Collaborator Author

@Rob-Hague Rob-Hague May 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

later this will be used in SshData to remove large array allocations when reading e.g. ChannelDataMessage (the motivation for this change)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants