H
hsgrass
Unregistered / Unconfirmed
GUEST, unregistred user!
请问idtcpserver.threads.locklist 和再新建一个threadlist.add(tidpeerthread)这样, 然后循环全部用户,那个比较快? ( 积分: 200 )<br />请问idtcpserver.threads.locklist 和再新建一个threadlist.add(tidpeerthread)这样, 然后循环全部用户,那个比较快?
还有,在INDYSERVER的ONCONNECT里面是否需要像下面这样的进入CRI..的代码?
procedure TMainFrm.kbmMWTCPIPIndyServerTransport1Connected(Sender: TObject;
Info: TkbmMWCustomTransportInfo);
var
i: integer;
begin
cs.Acquire; // 这句可以省了吗?
try
i := strtoint(iConnected.Caption);
iConnected.Caption := inttostr(i + 1);
if i > ConPeakValue then
begin
Label7.Caption := fd(now);
Label5.Caption := iConnected.Caption;
end;
finally
cs.Release;
end;
end;
谢谢
还有,在INDYSERVER的ONCONNECT里面是否需要像下面这样的进入CRI..的代码?
procedure TMainFrm.kbmMWTCPIPIndyServerTransport1Connected(Sender: TObject;
Info: TkbmMWCustomTransportInfo);
var
i: integer;
begin
cs.Acquire; // 这句可以省了吗?
try
i := strtoint(iConnected.Caption);
iConnected.Caption := inttostr(i + 1);
if i > ConPeakValue then
begin
Label7.Caption := fd(now);
Label5.Caption := iConnected.Caption;
end;
finally
cs.Release;
end;
end;
谢谢