0

If I assign an TIdSchedulerOfThreadPool to my IdTCPServer, will I still be limited to the number of simultaneous connections?

My IdTCPServer properties are :

 ListenQueue : 30
   MaxConnections : 0
   ReuseSocket rsTrue
   Scheduler :MyIdSchedulerOfThreadPool
   TerminateWaitTime : 5000

MyIdSchedulerOfThreadPool's properties :

Scheduler: MyIdSchedulerOfThreadPool
MaxThreads = 0
PoolSize = 0
ThreqdPriority = tpNormal

No coding; I just assign the MyIdSchedulerOfThreadPool to Scheduler.


Sdean
  • 245
  • 2
  • 5
  • 12
  • 2
    Welcome to Stack Overflow. You've asked two entirely unrelated questions. Please pick *one* to ask here in this post. Then [edit] the post to remove the other question, and post it separately. – Rob Kennedy Sep 05 '13 at 19:54

1 Answers1

2

The TIdTCPServer.MaxConnections property controls how many simultaneous clients are allowed to be connected at a time.

The TIdSchedulerOfThread.MaxThreads property controls how many simultaneous threads are allowed to be running at a time (idle or otherwise).

The TIdSchedulerOfThreadPool.PoolSize property controls how many simultaneous idle threads are allowed to be in the pool at a time.

So when you have a TIdSchedulerOfThread... assigned, the max number of simultaneous connections is really the smaller value between the MaxConnections and MaxThreads properties, since each client connection requires a thread to manage it.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770