Ok. I made simple application based on Http.GetAsync function.
Heres what i got:


-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 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 

My idea is that when 2 HttpCli components are trying to access 
ListView, something bad happens... but not sure if thats the 

Please HELP! :)

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