I tried to display the sent text file in memo.lines without saving it to disk
from server
try Ms := TMemoryStream.Create; Ms.LoadFromFile('update.txt'); Ms.Position := 0; AContext.Connection.IOHandler.LargeStream := True; AContext.Connection.IOHandler.Write(Ms, 0, True); finally Ms.Free; end;
to the client ... im not sure how to do this in the client
try Ms := TMemoryStream.Create; Ms.Position := 0; IdTCPClient1.IOHandler.LargeStream := True; IdTCPClient1.Connection.IOHandler.ReadStream(Ms, -1,false); finally Memo1.Lines.LoadFromStream(Ms); Ms.Free; end;
Can someone help me on how to make this work, if possible?
source share