I don't see anything really wrong in what you describe. Except maybe StrPas 
which is a string handling function that shouldn't used with binary data as 
HTTP can send. Use Move instead.

You can do better than use TTimer, but using them is not a problem for sure.

If you suspect ListView to be the problem, just replace it by a simpler 
component such as TMemo just for testing. If problem goes away, then you'll 
know where the problem is.

I understod that you didn't use any thread. That's perfect. However if you 
use thread, care must be taken because most VCL is not thread safe and you 
must synchronize.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be



----- Original Message ----- 
From: "Ann" <[EMAIL PROTECTED]>
To: <twsocket@elists.org>
Sent: Friday, September 09, 2005 8:12 PM
Subject: [twsocket] HTTPCli.GetAsync problem.


> Ok. I made simple application based on Http.GetAsync function.
> Heres what i got:
>
> Components:
>
> -TList_1 - List of busy components
> -TList_2 - List of free components
> -HTTPCli - 30 more created dynamicly
> -TStringList - a queue of hosts to gather data from
> -ListView - table to store gathered data
> -Timer_1 - to make "threads" workin'
> -Timer_2 - to check all over again
> -ToolBar - tools to save the list, load list etc etc.
> -StatusBar - to show how many components are in use
> -ProgressBar - shows the progress of current job
> -CoolTrayIcon - to be able to minimalize app to tray
>
> Here's how it works:
> At startup 30 HTTP components are being created and added to
> TList_2. U can add new hosts to gather data, and they appear in
> TStringList. When timer ticks it checks if there is something in
> TStringList (queue) and if there are any components in TList_2
> (free). If there are, it moves HTTPCli component from TList_2 (free)
> to TList_1 (busy) and uses it to GetAsync required data. Data isn't
> to large so I'm gathering it OnDocData converting buffer with
> strpas() function. Then some function searches the ListView for
> requested record and changes the value to current. And when its
> done, component is moved back to TList_2 (free components). After
> all records are done, Timer_2 starts and counts 1 minute to start
> another cycle (to keep the data in ListView up-to-date).
>
> But...
>
> But there seems to be a problem... don't know exacltly what is it,
> but after few hours of working (i guess minimalized to tray) after
> Application.restore, toolbar, and sometimes statusbar dissapear! I
> checked it with WinDowse and those objects are just being destroyed
> or something - they are not there even hidden... Oh... and after
> closing application it often crashes and sometimes crashes without
> closing with "access violation". Any ideas what could possibly be
> wrong?
>
> My idea is that when 2 HttpCli components are trying to access
> ListView, something bad happens... but not sure if thats the
> problem...
>
> Please HELP! :)
> Ann
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to