Ann wrote:
> But how do i convert it to StringList ?
OT, but try
AStream.Seek(0, sofromBeginning);
StringList.LoadFromStream(AStream);
Arno Garrels
>
> - Original Message -
> From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
> To: "ICS support mailing"
> Sent: Sunday, April 17, 2005 10:3
But how do i convert it to StringList ?
- Original Message -
From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
To: "ICS support mailing"
Sent: Sunday, April 17, 2005 10:38 PM
Subject: Re[4]: [twsocket] Multithreaded http...
> Hello Ann,
>
> in On requestDone:
> THttpCli(Sender).RcvdStream
Hello,
I noticed that the HttpCli component return the 404 status code not
only when the server return this code but even under different
situations. For example when it is unable to resolve the hostname or
when wsocket raise an error (please correct me if I'm wrong).
This is a problem because th
Wilfried Mestdagh wrote:
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..
It's not that much more code.
NewTime := GetTickCount();
if NewTime > OldT
> 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..
Perhaps, but Microsoft's law says that patches are released once a
month that invariably re
Hello Ann,
in On requestDone:
THttpCli(Sender).RcvdStream
---
Rgds, Wilfried
http://www.mestdagh.biz
Sunday, April 17, 2005, 22:10, Ann wrote:
> - Original Message -
> From: "Marco van de Voort" <[EMAIL PROTECTED]>
> To: "ICS support mailing"
> Sent: Sunday, April 17, 2005 9:05 PM
>
- 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 GetTickCount
> > roll over every 49 day
> 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
> > 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.
--
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
Hello Arno,
> Sorry for being OT
No it is not OT, it is interesting since timeouts are often handled in
comm programs. I have no Delphi open, but I have some programs where I
have separate class to get me elap seconds, minutes etc. Something like
this (whitch will rollover after 136 years, so ple
> What will happen when someone will change the system time?
> What does (TDataTime-TDataTime) return? miliseconds?
Never use TDateTime to measure time durations in Delphi, instead use
GetTickCount which returns milliseconds since Windows booted as a
simple longword.
Angus
--
To unsubscribe
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
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
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
- Original Message -
From: "Francois PIETTE" <[EMAIL PROTECTED]>
To: "ICS support mailing"
Sent: Sunday, April 17, 2005 3:47 PM
Subject: Re: [twsocket] Multithreaded http...
> You need:
> - A TStringList with all URL to get, call it UrlToGetList
Understood
> - A TSringList with all URL
> Both MsgWaitForMultpleObjects and Sleep seriously slow down a program
> that's trying to do multiple jobs at the same time.
Maybe you are referring to the first use I made of MsgWaitForMultpleObjects.
Since then, I have changed the order in the code and now there is no more
slow down, imo.
--
[
> :-( I cant handle it ;- I dont really understand the HTTPAsy example
> ;-( Could anybody help me?
HttpAsy is a simple application which take a list of URL and either get
those URL one after the other (sequencially) or get all at the same time
using a component for each one.
> For example i
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
> Do you say that you are convinced MsgWaitForMultpleObjects() is faster
> than Sleep()and ProcessMessages; ;-)
Both MsgWaitForMultpleObjects and Sleep seriously slow down a program
that's
trying to do multiple jobs at the same time.
Angus
--
To unsubscribe or change your settings for TW
:-( I cant handle it ;- I dont really understand the HTTPAsy example
;-( Could anybody help me? For example i got a an edit, where im deciding
how may "threads" (simaltaneous async http components) are going to be
used... for example ... 50..., got some memo... every line of memo is some
http a
Angus Robertson - Magenta Systems Ltd wrote:
>> However the speed depends of course, if you have just a single
>> instance, it makes no difference, but how do you realize multiple,
>> concurrent i.e. FTP-dowloads in sync mode? You would have to go
>> multithreaded, pooled or
>> one thread per conne
> However the speed depends of course, if you have just a single
> instance, it makes no difference, but how do you realize multiple,
> concurrent i.e. FTP-dowloads in sync mode? You would have to go
> multithreaded, pooled or
> one thread per connection but that's definitely slower than having
23 matches
Mail list logo