添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
失落的猴子  ·  solidworks.pdf网盘下载 - ...·  3 月前    · 
帅呆的韭菜  ·  MacOS ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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.

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 5, 2013 at 19:54

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.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.