Indy FTP 警告:Only one TIdAntiFreeze can be active in an application
> Should I use a AntiFreeze component on every form I have a TIdTCPClient
> component? Or is one enough to handle the whole Application?
One is enough. According to the Indy help file,
--------
Only one TIdAntiFreeze can be active in an application. If another
instance already exists, an exception is raised.
--------
Note that if you have multiple TIdTCPClient objects connected at the
same time, and you call ReadXXX twice or more often (e. g. on a button
click event) in the main thread context, then the last called ReadXXX
will return first, blocking the other ReadXXX requests even if they
could return data. This is because of the nature of the AntiFreeze
mechanism.
To avoid this effect, use a dedicated reader thread for each connection
instead of AntiFreeze. There is a TIdTCPClient descendant with its own
reader thread, firing an event when data arrive, at
http://come.to/delphi-bits .
-Michael
TIdAntiFreeze = class(TIdAntiFreezeBase)
Only one TIdAntiFreeze can be active in an application. If another instance already exists, an exception is raised. TIdAntiFreezeBase uses the global variable GAntiFreeze, declared in the TIdAntiFreezeBase unit, to determine if another instance has already been created.
Note: GAntiFreeze is not assigned if an instance is added in the form designer (during design time).
Note: The TIdAntiFreeze.pas unit must NOT appear in the uses clause of any Indy or descendant unit. This unit is linked in an application when the component is placed on a Form. This is done to preserve isolation from the Forms.pas and QForms.pas units.
procedure Process; override;
Note: Due to the differences in message dispatching, Process does not use or inspect ApplicationHasPriority on the Linux Platform; Process simply calls Application.ProcessMessages.
Note: The TIdAntiFreeze.pas unit must NOT appear in the uses clause of any Indy or descendant unit. This unit is linked in an application when the component is placed on a Form. This is done to preserve isolation from the FORMS.PAS and QForms.pas units.
Indy FTP 警告:Only one TIdAntiFreeze can be active in an application的更多相关文章
- ftp 229
在sels10机器上登入ftp输入用户名和密码之后再ls发现出现如下问题Entering Extended Passive Mode ftp> ls229 Entering Extended P ...
- Different between Telnet/SSH/FTP
http://www.differencebetween.net/category/technology/protocols-formats/ Telnet vs SSH Secure Shell, ...
- ftp的主动模式active mode和被动模式 passive mode的配置和区别
ftp的主动模式active mode和被动模式 passive mode的配置和区别 2017年05月08日 17:47:16 阅读数:21768 本文主要记录的是在linux上的区别,弄了一整天才 ...
- iOS警告框和操作表
应用如何与用户交流呢? 警告框(AlertView)和操作表(ActionSheet)就是为此而设计的. 本文案例的原型草图如图3-48所示,其中有两个按钮“Test警告框”和“Test操作表”,点击 ...
- IdTcpClient简单示例
procedure TForm1.btnHttpGetClick(Sender: TObject); begin idtcpclnt1.Host := '192.168.10.88'; idtcpcl ...
- Codeigniter
最近准备接手改进一个别人用Codeigniter写的项目,虽然之前也有用过CI,但是是完全按着自己的意思写的,没按CI的一些套路.用在公众的项目,最好还是按框架规范来,所以还是总结一下,免得以后别人再 ...
- 总结Codeigniter的一些优秀特性
总结Codeigniter的一些优秀特性 近期准备接手改进一个别人用Codeigniter写的项目.尽管之前也实用过CI,可是是全然按着自己的意思写的,没按CI的一些套路.用在公众的项目,不妨按框架规 ...
- Codeigniter的一些优秀实践
最近准备接手改进一个别人用Codeigniter写的项目,虽然之前也有用过CI,但是是完全按着自己的意思写的,没按CI的一些套路.用在公众的项目,最好还是按框架规范来,所以还是总结一下,免得以后别人再 ...
- 转:Delphi 6 实用函数
来自: daocaoren0824, 时间: -- ::, ID: 再给你一份 程序员实用函数 {▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎} {▎ ▎} {▎ 大 ...
随机推荐
- ionic 开发笔记
1.AngularJS 外部的控制器(DOM 事件.外部的回调函数如 jQuery UI 空间等)调用了 AngularJS 函数之后,必须调用$apply.在这种情况下,你需要命令 AngularJ ...
- 编译安装apache
1.安装依赖库:“Development Tools” “Server Platform Development” pcre-devel 2.安装apr,apr-util 从yum源安装或去ap ...
- python脚本实现scp上传下载功能
普通版本 1 # -*- coding:utf-8 -*- import paramiko,os,sys,time port = 22 user = 'root' def ssh_scp_put(ip ...
- Nginx基本使用
Nginx基本使用 下载源码包http://nginx.org/ http://nginx.org/en/download.html yum -y install pcre-devel openssl ...
- python基础回顾1
定义 tuple(元组), list (表) #!/usr/bin/env python # encoding: utf-8 a = 10 #定义一直变量,无需声明 s1 = (2,1.3,'love ...
- Python【第四章】:socket
ocket通常也称作"套接字",用于描述IP地址和端口,是一个通信链的句柄,应用程序通常通过"套接字"向网络发出请求或者应答网络请求. socket起源于Uni ...
- Linux 远程复制文件
Linux 远程复制文件 如果想把机器A上面的dir目录下面的所有文件复制到机器B的dir目录下,我们可以使用nc命令来完成 在机器A的dir目录下面执行: tar -czf - * | nc -l ...
- Sublime Text 2 实用快捷键(Mac OS X)
打开/前往: ⌘T 前往文件 ⌘⌃P 前往项目 ⌘R 前往 method ⌘⇧P 命令提示 ⌃G 前往行 ⌃ ` python 控制台 ——————— 编辑: ⌘L 选择行 (重复按下将下一行加入选择 ...
- html传参数
var request = { QueryString: function (paramName) { var url = window.location.search; paramValue = & ...
- 大熊君JavaScript插件化开发------(实战篇之DXJ UI ------ ProcessBar)
一,开篇分析 Hi,大家好!大熊君又和大家见面了,还记得前两篇文章吗.主要讲述了以“jQuery的方式如何开发插件”,以及过程化设计与面向对象思想设计相结合的方式是 如何设计一个插件的,两种方式各有利 ...