Thanks Wilfried and Arno.
I did have NOFORMS defined in the project settings.
That's how I got 111KB in the original project. Then I
just modified it.
I tried excluding the uses units one by one and it seems
that I'm having the minimum. What I have (in all units) are:
Windows, SysUtils, Messag
Hehe, unfortunately, its a little more difficult than that...you'll need to
derive your own TFTPClient and make it use TThrottledWSocket internally
instead of TWSocket.
Make sure this is for the data connection too, the control connection
shouldn't need throttling.
Dan
- Original Message --
Hello Jack,
> With NOFORMS defined, the application size is about 111KB.
the NOFORMS exclude some units in the uses clause to decrease the
filesize.
> After I replaced TWSocket with TWSocketServer, the file size
> becomes over 300KB. I went through the uses clauses. It's
> the minimum already. I
Jack wrote:
> Hi Francois, Wilfried and others,
>
> I noticed that the Console server demo uses TWSocket.
> With NOFORMS defined, the application size is about 111KB.
Compiled with D7 it's 159 KB here.
>
> After I replaced TWSocket with TWSocketServer, the file size
> becomes over 300KB. I went
Hi Francois, Wilfried and others,
I noticed that the Console server demo uses TWSocket.
With NOFORMS defined, the application size is about 111KB.
After I replaced TWSocket with TWSocketServer, the file size
becomes over 300KB. I went through the uses clauses. It's
the minimum already. I can not
Yes I tried it, but it slow down my stats and if I clicked on abort the
program abort the transfer with a delay ...
Maybe I'll add Dan's code, if he can give me a short example how to use his
functions ... ;)
> Hello Mice,
>
> > Do You have a exsample for msgWait?
>
> this is my previous mail. Y
Nice work. Can You give me the code to start Your functions.
This won't work:
unit Main;
interface
uses
...
uthrottledWsocket;
procedure TForm1.FtpClient1Progress(Sender: TObject; Count: Integer;
var Abort: Boolean);
varS: String;
TotalTime: TDateTime;
H, M, Sec, MS: Word;
DLTim
You can have a look at and try to modify/improve my throttling code:
http://www.xantorrent.pwp.blueyonder.co.uk/ics/uThrottledWSocket.pas
Dan
- Original Message -
From: "Mice Cage" <[EMAIL PROTECTED]>
To: "ICS support mailing"
Sent: Sunday, April 10, 2005 12:02 PM
Subject: Re: Re[2]: [tws
Hello Mice,
> Do You have a exsample for msgWait?
this is my previous mail. You probably overlooked, or not yet received:
> See the ForceSleep argument in the delay function. If you set it (like
> you did), it uses sleep to delay. when you use sleep your application
> stops pumping messages, so
Do You have a exsample for msgWait? Till now no strange things happend.
Sleep freezes the mainform and in a other tip the solve it also with
Application.ProcessMessages.
The code is designed for multithreads, so it shouldn't be used in thy case I
need it for.
> Hello Mice,
>
> > Applicatio
Hello Mice,
> Application.ProcessMessages;
> Sleep(x);
Bad idea :(
Pumping messages will have your event re-entered and thus produce
unpredicable results. If you wants to do that then you have to write a
mechanism to prevent it.
It is mutch better to use the MsgWait function, as I ha
> Sorry but this was wrong. I found the solution:
>
> If X>=0 Then
>Begin
>If ForceSleep Then
>begin
> Application.ProcessMessages;
> Sleep(x);
> end
>Else
> MsgWaitForMultipleObjects(0,msgHandles,False,X,QS_SENDMESSAGE);
>End;
>
> Application.ProcessMess
Sorry but this was wrong. I found the solution:
If X>=0 Then
Begin
If ForceSleep Then
begin
Application.ProcessMessages;
Sleep(x);
end
Else
MsgWaitForMultipleObjects(0,msgHandles,False,X,QS_SENDMESSAGE);
End;
Application.ProcessMessages is the solution. Mayb
Hello Mice,
> TSMThrottle_Delay(Count,2,true);
> When the Delayfunction starts to work the whole amp starts to freeze
See the ForceSleep argument in the delay function. If you set it (like
you did), it uses sleep to delay. when you use sleep your application
stops pumping messages, so it free
This function uses sleep, so it is clear why it freezes my app. Timers are
the only solution. ... but I don't have a clue how to implent a timer into
the delayfunction with the same function like sleep but without freazing the
app.
--
Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl
--
I implented it directly into the Main-Form like this:
var
Form1: TForm1;
{some variables}
MYCounterMax:Integer;
MYLastProgressTime:Integer;
MYLastProgressCount:Integer;
MYLastMaxRate:Integer;
MYLastSleep:Integer;
MYLastChunkSize:Integer;
MyLastCountValue:Integer;
BytesReadIn:Integer;
Hello Mice,
The code at http://www.smatters.com/ics is not from me, it is from Davie
(its been a while we heard from him). But I thought there was a brief
example on how to use it, maybe in top of file in comment ?
The principly is following: you iuse the component in a thread. Davie's
code calcu
17 matches
Mail list logo