当我调用idtcpserver1.active := true 服务器启动成功以后,发现系统运行慢,看了一下,cpu占用了100%,这怎么解决
解决方案 »
- 通过DBGrid可以直接更改数据,这样很不安全,如何能保险一点?
- 头大了Parameters 'LR' not found
- MDI子窗体,关闭时的问题
- 调用外部EXE,然后后台执行
- 数字签名碰到的问题。
- 为什么Delphi6取数据与Delphi7取出的数据不一样,请大家指点!100分敬请笑纳!
- accesse 库('select * from rsmn where 性别="男"')提示错误,紧急!!
- 新年快乐!动态报表!
- 为什么Delphi6的Editor font还是没有宋体?
- 有哪位大侠知道WINZIP 或OFFICE的工具条的图标是放在哪里的?
- 高手讲解一下VB的Delphi之间有什么差别
- Delphi问题,请各位帮忙
//判断如果服务器没有停止的情况
if not StopServer then
begin
fErrors.Append('服务器停止错误');
Result := false;
exit;
end;
// 清空加入Bindings的IP服务;
IdServer.Bindings.Clear;
try
try
//添加一个服务
Binding:=IdServer.Bindings.Add;
//设置该服务的IP地址
Binding.IP := ComBIp.Text;
//设置该服务的端口
Binding.Port := StrToInt(EditPort.Text);
SL.append('服务器启动IP ' + Binding.IP + ' 端口号 ' + EditPort.Text);
//启动服务器
IdServer.Active := true;
//设置返回值
result := IdServer.Active;
//设置该变量判断服务器是否启动
fServerRunning := result;
lbProcesses.Items.AddStrings(SL);
lbProcesses.Items.Append('服务器启动');
if result then
StatusBar.SimpleText := '服务已经启动'
else
StatusBar.SimpleText := '服务没有启动'; except
on E : Exception do
begin
lbProcesses.Items.Append('服务器没有启动');
fErrors.append(E.Message);
Result := false;
fServerRunning := result;
end;
end;
finally
FreeAndNil(SL);
end;
即使只用了最简单的
Binding:=IdServer.Bindings.Add;
Binding.IP := ComBIp.Text;
Binding.Port := StrToInt(EditPort.Text);
IdServer.Active := true;
我没事哦用最新的Indy9.0.17吗?