Hi, In Indy when we are sending some strings to the server , they change and will be shown in new format . for example i tried to send a binary file(File.exe) with "WriteLn" command in indy :
Ms.LoadFromFile(FileAddress);
Ms.Read(B, Chunk);
for j := low(B) to high(B) do
begin
Part := Part + chr(B[j]);
end;
and for sending strings :
FileClient.IOHandler.WriteLn(Part);
when client was sending strings to the server , i was monitoring the clinet with a sniffer . and finally i got this results :
MZ?.........yy..,.......@...................................,.....o..?.I!,.LI!This program cannot be run in DOS mode....$..
As you see there are some characters that they are not in their true format any more and they changed to "?" character . but it should be noted that the sniffer automatically changed some string to "." , for example one of this points(".") is chr(0) or chr(5) maybe !!
but the sniffer couldn't change some characters to "." and we see them in "?" format . for example i open a binary file with notepad and you can see true format :
Anyway , the question is : how can i send a binary file with "WriteLn" command in Indy 10 ?