|Subject:||Re: HTTPServer # of Threads|
|Posted by:||Remy Lebeau (TeamB) (email@example.com)|
|Date:||Thu, 30 Oct 2003|
"steve" <csufsurf…@yahoo.com> wrote in message
> I'm trying to figure out how many threads are currently
> executing on a server at a given time. I figured it would be
> in IdHTTPServer1.ThreadMgr.ActiveThreads but I can't
> find a Count property.
ActiveThreads is a TThreadList. You have to call LockList() first in order
to access the actual list:
with IdHTTPServer1.ThreadMgr.ActiveThreads do
pList := LockList;
iCount := pList.Count;
// use iCount as needed
> I did see IdHTTPServer1.Bindings.Count but that number
> stayed at 1 when I had multiple client connections.
As it should. There is a Binding for each IP/Port combo that the server is
listening on, that does not change while the server is still active.
> I'm not familiar with Bindings but it seems that it has more to do
> with the socket information that it is bound to not the clients that
> connect to it.
HTTPServer # of Threads posted by steve on Thu, 30 Oct 2003