I'm looking for a most fastest (stock market application, extremely time critical) solution for transfer a lot of encrypted RawByteString-data (up to 500 records/s, ) from TIdTCPServer to TIdTCPClient.
What is the best way to do that?
Thanks in advance!
Edit:
In my project I need to use a n'Software library for the encryption of strings. The fastest encryption method returns a RawByteString. Theoretically, I should only set the CodePage for encrypted string and transfer it UTF8 encoded, but all my attempts failed.
So seemed to me the most logical:
Server:
var
rbs: RawByteString;
begin
rbs := EncryptString(AInput, DEFAULT_ENCRYPTION_KEY);
SetCodePage(rbs, 65001, true);
AContext.Connection.IOHandler.WriteLn(rbs, IndyTextEncoding_UTF8);
...
end;
Client:
var
rbs: string;
Output: string;
begin
rbs := IdTCPClient1.IOHandler.ReadLn(IndyTextEncoding_UTF8);
Output := DecryptString(rbs, DEFAULT_ENCRYPTION_KEY);
...
end;