Re[2]: [twsocket] NOFORMS and TWSocketServer

2005-04-10 Thread Jack
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

Re: Re[2]: [twsocket] Is there a way to setupa valuefor maximal downloadspeed?

2005-04-10 Thread Dan
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 --

Re: [twsocket] NOFORMS and TWSocketServer

2005-04-10 Thread Wilfried Mestdagh
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

Re: [twsocket] NOFORMS and TWSocketServer

2005-04-10 Thread Arno Garrels
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

[twsocket] NOFORMS and TWSocketServer

2005-04-10 Thread Jack
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

Re: Re[8]: [twsocket] Is there a way to setup a value for maximal downloadspeed?

2005-04-10 Thread Mice Cage
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

Re: Re[2]: [twsocket] Is there a way to setup a valuefor maximal downloadspeed?

2005-04-10 Thread Mice Cage
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

Re: Re[2]: [twsocket] Is there a way to setup a valuefor maximal downloadspeed?

2005-04-10 Thread Dan
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

Re[8]: [twsocket] Is there a way to setup a value for maximal downloadspeed?

2005-04-10 Thread Wilfried Mestdagh
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

Re: Re[6]: [twsocket] Is there a way to setup a value for maximal downloadspeed?

2005-04-10 Thread Mice Cage
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

Re[6]: [twsocket] Is there a way to setup a value for maximal downloadspeed?

2005-04-10 Thread Wilfried Mestdagh
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

Re: Re[4]: [twsocket] Is there a way to setup a value for maximal downloadspeed?

2005-04-10 Thread Guillaume MAISON
> 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

Re: Re[4]: [twsocket] Is there a way to setup a value for maximal downloadspeed?

2005-04-10 Thread Mice Cage
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

Re[4]: [twsocket] Is there a way to setup a value for maximal downloadspeed?

2005-04-10 Thread Wilfried Mestdagh
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

Re: Re[2]: [twsocket] Is there a way to setup a value for maximal downloadspeed?

2005-04-10 Thread Mice Cage
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 --

Re: Re[2]: [twsocket] Is there a way to setup a value for maximal downloadspeed?

2005-04-10 Thread Mice Cage
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;

Re[2]: [twsocket] Is there a way to setup a value for maximal downloadspeed?

2005-04-10 Thread Wilfried Mestdagh
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