IdTCPServer
IdTCPServer1
Server本身就支持多线程,一个服务端连接多个客户端。
IdTCPServer1.Bindings.Add.IP := '127.0.0.1';
IdTCPServer1.Bindings.Add.Port := 153;
void __fastcall TForm2::IdTCPServer1Execute( TIdContext * AContext )
{
AContext->Binding->PeerIP;
AContext->Binding->PeerPort; AContext->Connection->IOHandler->SendBufferSize;
AContext->Connection->IOHandler->Write( );
AContext->Connection->IOHandler->WriteFile( );
AContext->Connection->IOHandler->WriteDirect( );
AContext->Connection->IOHandler->WriteLn( ); AContext->Connection->IOHandler->Readable( );
AContext->Connection->IOHandler->ReadByte( );
AContext->Connection->IOHandler->ReadBytes( );
AContext->Connection->IOHandler->ReadChar( );
AContext->Connection->IOHandler->ReadStream( );
AContext->Connection->IOHandler->ReadString( );
AContext->Connection->IOHandler->ReadStrings( );
AContext->Connection->IOHandler->ReadInt16( );
}
IdTCPServer的更多相关文章
- Delphi实例-IdTCPServer和IdTCPClient的使用(支持文件发送)
相关资料: http://blog.csdn.net/earbao/article/details/46514313 结果注意: 1.Use IdContext.IdGlobal 这两个单元2.不能使 ...
- IdTCPServer, idTCPClient
IdTcpServer uses IdContext //需要引用 属性,方法: IdTCPServer.Active :=True; //开启服务器 IdTCPServer1.Bindings.Ad ...
- Delphi组件indy 10中IdTCPServer修正及SSL使用心得
indy 10终于随着Delphi2005发布了,不过indy套件在我的印象中总是复杂并且BUG不断,说实话,不是看在他一整套组件的面子上,我还是喜欢VCL原生的Socket组件,简洁,清晰.Indy ...
- 关于idtcpserver的使用
原文:http://blog.csdn.net/hnxxcxg/article/details/2798019 用idTCPServer,客户端接上来时,如何取得客户端的IP? IP:=AThread ...
- Delphi IdTCPClient IdTCPServer 点对点传送文件
https://blog.csdn.net/luojianfeng/article/details/53959175 2016年12月31日 23:40:15 阅读数:2295 Delphi ...
- 短信猫 TIdTCPServer TIdTCPClient
短信猫 服务端: IdTCPServer1: TIdTCPServer; IdAntiFreeze1: TIdAntiFreeze; unit UnitSever; interface uses Wi ...
- 高人ozhy111提供的下载资源
特别是有很多手机方面的独创源代码,先记下来,有空挨个看一遍: http://download.csdn.net/user/ozhy111 比如:idtcpserver文件传输xe7PC端及手机端 ht ...
- Indy10 即时通讯Demo
最近闲来无事,重新学习了Indy10,顺手写了一段即时通讯代码.与上次写的笔记有不同之处,但差别不大. 未研究过TCP打洞技术,所以下面的代码采用的是 客户端--服务器--客户端 模式,也就是服务 ...
- Indy的TCPServer到底能支持多少个连接
最近一个项目,最开始使用IdTcpServer,在大压力测试的时候,只连接了800个多一点的客户端(每个客户端连接上之后每秒钟发送一个几十字节的报文,服务器应答).但是持续的时间不会超过10分钟,服务 ...
随机推荐
- android 使用代码实现 RelativeLayout布局
只需把代码copy进入oncreate方法即可运行 RelativeLayout rl = new RelativeLayout(this); Button btn1 = new Button(thi ...
- Remember that ordinal parameters are 1-based!
问题发生的原因是:hql语句里不需要参数,却添加了一个参数,删掉添加参数的语句就可以了!
- 51nod1225 余数之和
打表可以看出规律.分块求就可以了. #include<cstdio> #include<cstring> #include<cctype> #include< ...
- openerp学习笔记 context 的应用
1.在Action中定义,context用于传递搜索条件和分组条件,在搜索视图中默认显示: 示例代码: <record model="ir.actions.act_window&quo ...
- 封装sharedPreferences SettingsSPData
/*************************************************************************** * 封装sharedPreferences S ...
- windows下用mingw编译linux项目
1.下载安装mingw32 2.将mingw下bin和msys\1.0下bin设置为系统path 3.启动msys.bat 4.cd到项目目录 5.输入./configure 6.输入make 7.输 ...
- id to load is required for loading----id被要求加载exception
表示id主键 没有找到,可能是数据库中的主键设置了not null 而你没有给予主键 还有就是没有传递主键到 数据库中
- 【转】shell脚本调试(bash trap support bashdb )
原文网址:http://zhu8337797.blog.163.com/blog/static/170617549201122512712136/ 命 令 选 项 功 能 bash –x 脚本名 回显 ...
- 常见排序算法基于JS的实现
一:冒泡排序 1. 原理 a. 从头开始比较相邻的两个待排序元素,如果前面元素大于后面元素,就将二个元素位置互换 b. 这样对序列的第0个元素到n-1个元素进行一次遍历后,最大的一个元素就“沉”到序列 ...
- Ubuntu 安装
最近又有工作需要,又需要在虚拟机上工作了.记得上次使用Ubuntu的时候还是7,8年前呢 用的是vmware 7 ,buntu的版本记不清了.时隔多年又捡起来了,记忆还停留在过去,于是被折腾惨了. 1 ...