多线程网络传输

所属分类:Windows编程
开发工具:Delphi
文件大小:53KB
下载次数:519
上传日期:2006-02-15 10:32:49
上 传 者jwtom
说明:  在盒子里得到了这么多朋友无私的帮助,真的表示感谢!看到很多朋友在寻求多线程网络传输代码,为此,从我开发的网络棋牌游戏中整理出这个献给大家:) 开发环境:Delphi7.0+WinXP,没用其他控件(除了Delphi自带的Indy) 使用协议:TCP/IP 客户端一次发送65000字节的包,服务端负责组装并处理数据粘连。 使用ReadBuffer(),Send()函数来接收发送Buffer内字节,这样作的目的是使程序具有更好的灵活性。你可以自定义Buffer内那些字节的含义,例如是字符串、图像、声音、命令等等。 文件的多线程读写采用windows内存映像技术。 关键的服务器处理函数IdTCPServer1Execute(AThread: TIdPeerThread)是非线程安全的。如果使用临界区,那么多线程将在这里串行执行,严重降低多线程效率。对此,我采用一个简单的办法,具体可以看程序。
(be in the box so many friends selfless help and really grateful! Many friends in the search for multi-threaded network transmission code, for from my development of the network and dominoes game sorted out the dedicated people :) development environment : Delphi7.0 WinXP, useless other controls (except for the Delphi Indy own) use agreement : TCP/IP client to send a 65,000-byte packets, the server is responsible for assembling and processing data adhesion. Use ReadBuffer (), Send () function to receive this Buffer byte, for the purpose of this is to make procedures better flexibility. You can define Buffer byte within the meaning of those, such as strings, images, sounds, etc. order. The documents used to read and write multi-threaded windows memory mapping technology. Key server functio)

文件列表:
多线程传输服务端\files (0, 2005-12-17)
多线程传输服务端\ipfilter.cfg (34, 2005-12-07)
多线程传输服务端\Project1.cfg (390, 2005-12-17)
多线程传输服务端\Project1.dof (2484, 2005-12-17)
多线程传输服务端\Project1.dpr (240, 2005-12-17)
多线程传输服务端\Project1.res (876, 2005-12-17)
多线程传输服务端\SocketProcess.dcu (5279, 2005-12-17)
多线程传输服务端\SocketProcess.pas (5248, 2005-12-17)
多线程传输服务端\ThreadPublicData.dcu (462, 2005-12-06)
多线程传输服务端\ThreadPublicData.pas (157, 2005-12-06)
多线程传输服务端\Unit1.dcu (5308, 2005-12-17)
多线程传输服务端\Unit1.ddp (51, 2005-12-17)
多线程传输服务端\Unit1.dfm (1417, 2005-12-17)
多线程传输服务端\Unit1.pas (1747, 2005-12-17)
多线程传输服务端 (0, 2005-12-17)
多线程传输客户端\Project1.cfg (390, 2005-12-17)
多线程传输客户端\Project1.dof (2506, 2005-12-17)
多线程传输客户端\Project1.dpr (269, 2005-12-17)
多线程传输客户端\Project1.res (82928, 2005-12-17)
多线程传输客户端\Unit1.dcu (14763, 2005-12-17)
多线程传输客户端\Unit1.ddp (51, 2005-12-17)
多线程传输客户端\Unit1.dfm (2530, 2005-12-17)
多线程传输客户端\Unit1.pas (11047, 2005-12-17)
多线程传输客户端\Unit2.dcu (508, 2005-12-09)
多线程传输客户端\Unit2.pas (108, 2005-12-09)
多线程传输客户端 (0, 2005-12-17)
说明.txt (678, 2005-12-17)

近期下载者

相关文件


收藏者