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?
Suggestion ScSSHShell dont use tbytes, use tstringstream
Re: Suggestion ScSSHShell dont use tbytes, use tstringstream
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.
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.