Description: 多线程 网络传输
开发环境:Delphi7.0+WinXP,没用其他控件(除了Delphi自带的Indy)
传输协议:TCP/IP
客户端一次发送65000字节的包,服务端负责组装并处理数据粘连。
使用ReadBuffer(),Send()函数来接收发送Buffer内字节,这样作的目的是使程序具有更好的灵活性。你可以自定义Buffer内那些字节的含义,例如是字符串、图像、声音、命令等等。
文件的多线程读写采用windows内存映像技术。
关键的服务器处理函数IdTCPServer1Execute(AThread: TIdPeerThread)是非线程安全的。如果使用临界区,那么多线程将在这里串行执行,严重降低多线程效率。对此,我采用一个简单的办法,具体可以看程序。-multithreaded network transmission development environment : Delphi7.0 WinXP, useless other controls (except for the Delphi Indy own) transmission protocol : 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 function IdTCPServer1Execute (AThread : TIdPeerThread) non-thread safe. If the use of critical areas, so many threads here on serial implementation, a serious decline in the efficiency of multit Platform: |
Size: 69644 |
Author:水滴 |
Hits:
Description: 在盒子里得到了这么多朋友无私的帮助,真的表示感谢!看到很多朋友在寻求多线程网络传输代码,为此,从我开发的网络棋牌游戏中整理出这个献给大家:)
开发环境: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 Platform: |
Size: 54717 |
Author:tom |
Hits:
Description: 多线程 网络传输
开发环境:Delphi7.0+WinXP,没用其他控件(除了Delphi自带的Indy)
传输协议:TCP/IP
客户端一次发送65000字节的包,服务端负责组装并处理数据粘连。
使用ReadBuffer(),Send()函数来接收发送Buffer内字节,这样作的目的是使程序具有更好的灵活性。你可以自定义Buffer内那些字节的含义,例如是字符串、图像、声音、命令等等。
文件的多线程读写采用windows内存映像技术。
关键的服务器处理函数IdTCPServer1Execute(AThread: TIdPeerThread)是非线程安全的。如果使用临界区,那么多线程将在这里串行执行,严重降低多线程效率。对此,我采用一个简单的办法,具体可以看程序。-multithreaded network transmission development environment : Delphi7.0 WinXP, useless other controls (except for the Delphi Indy own) transmission protocol : 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 function IdTCPServer1Execute (AThread : TIdPeerThread) non-thread safe. If the use of critical areas, so many threads here on serial implementation, a serious decline in the efficiency of multit Platform: |
Size: 69632 |
Author:水滴 |
Hits:
Description: 在盒子里得到了这么多朋友无私的帮助,真的表示感谢!看到很多朋友在寻求多线程网络传输代码,为此,从我开发的网络棋牌游戏中整理出这个献给大家:)
开发环境: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 Platform: |
Size: 54272 |
Author:tom |
Hits: