Indy Help中 idTCPServer 两个属性的说明,请高手帮助翻译,100分奉上.(100分)

  • 主题发起人 主题发起人 小胡1
  • 开始时间 开始时间

小胡1

Unregistered / Unconfirmed
GUEST, unregistred user!
不要求十分准确,能说明这两个属性的作用也行。[:D]
1 TIdTCPServer.ListenQueue
Inicates the mximum number of unresolved connection attempts allowed.
property ListenQueue: integer;
Description
ListenQueue is an Integer property that indicates the maximum number of unresolved connection attempts allowed for listener threads before exception is raised. ListenQueue is used as an argument when socket descriptors for ListenerThreads are during created during server activation.
Use OnListenException to provide an event handler for notifications of exceptions raised when ListenQueue is exceeded.
The default value for ListenQueue is IdListenQueueDefault as assigned in the Create constructor.
2 TIdTCPServer.TerminateWaitTime
Specifies the time a server should wait for terminating threads.
property TerminateWaitTime: Integer;
Description
TerminateWaitTime is an Integer property that identifies the total number of milliseconds that the server should wait, in TerminateAllThreads, for all threads to complete termination. TerminateWaitTime is an aggregate delay time, and allows TerminateAllThreads to monitor the Threads list every 250ms until TerminateWaitTime has elapsed.
The default value for TerminateWaitTime is 5000 (5 seconds). Use a larger value for TerminateWaitTime when the server handles a large number of peer connection threads, or when OnDisconnected event handling for the peer connection involves time intensive operations.
 
我不懂网络,大概看懂的意思:
TIdTCPServer.ListenQueue
指定尝试进行连接的最大的次数。ListQueue 被使用为 ListenerThreads 的参数。使用 OnListException 提供超过此次数时的异常处理。
TIdTCPServer.TerminateWaitTime
指定服务端要停止线程前将等待的时间总数(毫秒)。用于 TerminateAllThreads。缺省值是 5000 毫秒。如果连接线程多的话,可以使用更大的值。
 
在Delphi6/7中利用UDP协议传送文件的例子
http://www.aidelphi.com/6to23/docu/MyUDP(Delphi6_7).rar
这有例子,也许对你有用呢
 
TIdTCPServer.ListenQueue
监听队列,如果有N个客户同时连进来,会一直排队等到你的程序 accept 他们为止.
如果超过这个数量的客户连进来,则会自动关闭.
第2个,同上
 

Similar threads

I
回复
0
查看
3K
import
I
I
回复
0
查看
3K
import
I
I
回复
0
查看
1K
import
I
I
回复
0
查看
3K
import
I
I
回复
0
查看
2K
import
I
后退
顶部