Suggestion ScSSHShell dont use tbytes, use tstringstream

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
kaffeburk
Posts: 207
Joined: Mon 29 Jan 2007 08:03

Suggestion ScSSHShell dont use tbytes, use tstringstream

Post by kaffeburk » Sat 07 Sep 2019 23:36

Hello,

After a few hours i got ScSSHShell1.ReadNoWait to work. You use tbytes, that perhaps can be described as an ancient technique? My oldest bok from 2005 dosen't cover it.

To find that I must write ReadNoWait(aTbytes[0],MyLength); and not just ReadNoWait(aTbytes,MyLength) did take a lot of research, also how to convert to a string "SetString(aString, PAnsiChar(@aTbytes[0]), Length(aTbytes))" was not easy. Most exempels dealt with tbytes already in ANSI.

Why not just use a TstringStream instead of tbytes?

ViktorV
Devart Team
Posts: 2795
Joined: Wed 30 Jul 2014 07:16

Re: Suggestion ScSSHShell dont use tbytes, use tstringstream

Post by ViktorV » Tue 10 Sep 2019 10:32

Thank you for the information and contributing to our product development.
You can use this method with the TBytes type: TScSSHCustomChannel.ReadNoWait(var Buffer: TBytes; const Offset, Count: integer).
Also you can use the TScSSHCustomChannel.ReadString method to handle strings.
We'll add a possibility to use this method with the parameter of type TStream in a future version of SecureBridge.

Post Reply