Re: Re[2]: [twsocket] Multithreaded http...

2005-04-18 Thread Francois Piette
> Anyway i still dont know how can i get da whole recived document > OnRequestDone... The document is stored in the stream you supplyed to RcvdStream property before starting GetAsync. > and can i put in there some procedures and they still will be async? If your processing take significative t

Re: Re[2]: [twsocket] Multithreaded http...

2005-04-17 Thread Ann
- Original Message - From: "Marco van de Voort" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Sunday, April 17, 2005 9:05 PM Subject: Re: Re[2]: [twsocket] Multithreaded http... > > you are ritght because working with float is more CPU. But Get

Re: Re[2]: [twsocket] Multithreaded http...

2005-04-17 Thread Marco van de Voort
> you are ritght because working with float is more CPU. But GetTickCount > roll over every 49 day... So without extra code the timeout can fail if > it is (by Murphy's law) just on the particular moment.. One can still use gettickcount then. One only has to combine it with your technique to keep

Re: Re[2]: [twsocket] Multithreaded http...

2005-04-17 Thread Francois PIETTE
> > What will happen when someone will change the system time? > > Then you are in trouble :( Not if she use GetTickCount which returns the nb of milliseconds since the system is up and running. Restart to zero after approximately 49 days. That is perfectly suitable for timeout determination. --

Re[2]: [twsocket] Multithreaded http...

2005-04-17 Thread Wilfried Mestdagh
Hello Angus, you are ritght because working with float is more CPU. But GetTickCount roll over every 49 day... So without extra code the timeout can fail if it is (by Murphy's law) just on the particular moment.. --- Rgds, Wilfried http://www.mestdagh.biz Sunday, April 17, 2005, 19:35, Angus Rob

Re: Re[2]: [twsocket] Multithreaded http...

2005-04-17 Thread Arno Garrels
Wilfried Mestdagh wrote: > You can also use GetTickCount, however overrun every 28 day's or so. Sorry for being OT, but that's why I suggested a tiny little helper function also for use in ICS, something like: function CalcTicksAppart(const T1: LongWord): LongWord; var T2 : LongWord; begin

Re[2]: [twsocket] Multithreaded http...

2005-04-17 Thread Wilfried Mestdagh
Hello Ann, Sorry I was incomplete :( > What will happen when someone will change the system time? Then you are in trouble :( > What does (TDataTime - TDataTime) return? miliseconds? From the top of my head: var BeginTime: TDateTime; EndTime: TDateTime; begin AllocConsole; // open a cons

Re[2]: [twsocket] Multithreaded http...

2005-04-17 Thread Wilfried Mestdagh
Hello Ann, > What will happen when someone will change the system time? > What does (TDataTime-TDataTime) return? miliseconds? DateTime returns the day's elapsed since 30 dec 1899. eg: 2 is 1 jan 1900 00:00, 1.5 is 1 jan 1900 12:00 etc. Meaning the fractions ar jsut the fractions of the day. It g

Re[2]: [twsocket] Multithreaded http...

2005-04-17 Thread Wilfried Mestdagh
Hello Ann, Several scenario's are possible. Depending on what you exacly have to do it is maybe interesting to make a separate class that manages the connections. But the principle is always the same. - you mention you need timeout, So you derive a component from THttpCli and give it a timer. - y