Dear Anton,
Thank you for your message,
Unfortunately my programmation level is not engouh good to understand
your explanation and
therefore I am unable to make any modifications you to tell me,
I do not even know what file I need to change :'(
Could you guide me to do the modification please ? and where ?
it would be really nice from you.
If not, no problem I understand you have no time to loose with my problem,
Anyhow thank you for your message,
Sincerely,
Bruno M.
Le 27/01/2011 08:45, Anton S. a écrit :
Arno, in FtpCli unit there's quite large piece of code
{$IFDEF UseBandwidthControl}
FBandwidthCount := 0; // Reset byte counter
if ftpBandwidthControl in FOptions then begin
if not Assigned(FBandwidthTimer) then
FBandwidthTimer := TIcsTimer.Create(Self);
FBandwidthTimer.Enabled := FALSE;
FBandwidthTimer.Interval := FBandwidthSampling;
FBandwidthTimer.OnTimer := BandwidthTimerTimer;
FBandwidthTimer.Enabled := TRUE;
// Number of bytes we allow during a sampling period
FBandwidthMaxCount := Int64(FBandwidthLimit) * FBandwidthSampling
div 1000;
FBandwidthPaused := FALSE;
end;
{$ENDIF}
repeating 4 times in
TCustomFtpCli.DataSocketGetSessionConnected
TCustomFtpCli.DataSocketPutSessionConnected
TCustomFtpCli.DataSocketGetSessionAvailable
TCustomFtpCli.DataSocketPutSessionAvailable
Shouldn't it be extracted into separate procedure?
Bruno, using BUILTIN_THROTTLE it's quite easy to add bandwidth control, just
add Socket.BandwidthLimit and Socket.BandwidthSampling assignment after socket
creation and that's all.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be