I need to transfer many files from one tcp indy server to a client using INDY10 components. Is there a way to improve the transfer speed by setting any parameter for the TCP client or server communication.
File Size : ~ 10 MBYte .... 50 Mybte
Is there a limit in respect to file size , my PC is using WIN 7 x64 and 32 GBYTE RAM Our network is LAN.100 other location LAN already improved to GIGABIT LAN
function SendStream(AContext: TIdContext; AStream: TStream): Boolean; overload;
var
StreamSize: LongInt;
begin
try
Result := True;
try
StreamSize := (AStream.Size);
// AStream.Seek(0, soFromBeginning);
AContext.Connection.IOHandler.Write(LongInt(StreamSize));
AContext.Connection.IOHandler.WriteBufferOpen;
AContext.Connection.IOHandler.Write(AStream, 0, False);
AContext.Connection.IOHandler.WriteBufferFlush;
finally
AContext.Connection.IOHandler.WriteBufferClose;
end;
except
Result := False;
end;
end;