Description: WINSOCK服务器端示例程序说明 该程序是基于对话框编程的,是采用一对多的方式进行连接的。 整个程序主要由CServerDlg,CServerApp,CListenSocket,CClientSocket构成的。 (所有关于类的说明在代码中有) 下面简单介绍一下程序流程: 主程序调用CListenSocket类的对象来进行对Socket的监听,当收到请求时调用主程序的函数来处理相应的连接,把Socket放进队列中。 对于Socket的接收数据和断开连接是由消息来触发的,是通过调用基类CSocket中的虚函数重载来处理的。 注:详细的过程,在程序代码中均有注释!-Winsock server sample program note that the procedure was based on dialog programming, using one-to-many is the way to connect. The entire process by CServerDlg, CServerApp, CListenSocket, constitute the CClientSocket. (All categories on the note in code) The following outlines procedures have : main program called CListenSocket category to the target of the listening socket, when the call request is received when the main program functions to the corresponding connections, socket into the queue. Socket for the reception of data and disconnected from the news to trigger, by calling the base class CSocket the virtual function to handle the heavy load. Note : Details of the procedure code have Notes! Platform: |
Size: 39262 |
Author:柳宝虎 |
Hits:
Description: WINSOCK服务器端示例程序说明 该程序是基于对话框编程的,是采用一对多的方式进行连接的。 整个程序主要由CServerDlg,CServerApp,CListenSocket,CClientSocket构成的。 (所有关于类的说明在代码中有) 下面简单介绍一下程序流程: 主程序调用CListenSocket类的对象来进行对Socket的监听,当收到请求时调用主程序的函数来处理相应的连接,把Socket放进队列中。 对于Socket的接收数据和断开连接是由消息来触发的,是通过调用基类CSocket中的虚函数重载来处理的。 注:详细的过程,在程序代码中均有注释!-Winsock server sample program note that the procedure was based on dialog programming, using one-to-many is the way to connect. The entire process by CServerDlg, CServerApp, CListenSocket, constitute the CClientSocket. (All categories on the note in code) The following outlines procedures have : main program called CListenSocket category to the target of the listening socket, when the call request is received when the main program functions to the corresponding connections, socket into the queue. Socket for the reception of data and disconnected from the news to trigger, by calling the base class CSocket the virtual function to handle the heavy load. Note : Details of the procedure code have Notes! Platform: |
Size: 38912 |
Author:柳宝虎 |
Hits:
Description: IP网的QoS技术研究,介绍了排队类型,等待时延等。-IP Network QoS technology research, the type of queue and wait for the time delay. Platform: |
Size: 6252544 |
Author:李京津 |
Hits:
Description: 这是一个关于用消息队列进行通信的小程序源码,makefile是在sco下的,如果在linux下可能要加socket的链接库-This is a message queue on the use of small communications procedures source, makefile in the sco, if under Linux may have to increase the socket libraries Platform: |
Size: 1024 |
Author:tch |
Hits:
Description: 一个简单的用java编写的聊天工具,用socket类处理通信部分
1.
运行server.bat
或在命令行下输入(要在工作目录):
java -jar Chat.jar 8888
打开服务器 8888也可以改为任意端口号
2.
运行client.bat
或在命令行下输入(要在工作目录):
java -jar Chat.jar
打开客户端
3.
主要类说明:
Server.java 等待用户连接,连接后为当前用户创建ServerListener对象
ServerListener.java 接受用户请求,并将消息移入消息队列
Sender.java 消息发送器,用循环不断检查消息队列中是否有新消息,有则发送消息,被发送的消息移出队列
Client.java 接受信息,提供与界面之间的接口函数
Chat.java 主要是用户界面 -with a simple preparation of java chat tools, with socket type handling a part of communication. server.bat or running the command line input (to the Public for directory) : java-jar Chat.jar 8888 Open Server 8888 can also read arbitrary port 2 . client.bat or running the command line input (to the working directory) : java-jar Chat.jar Open Client 3. main categories : Server.java waiting for users to connect, after connecting to the current users to create object ServerListener ServerListener . java user request, the information will be relocated Message Queue Sender.java news transmitters, cyclic Message Queue constantly check whether there are new news, then send messages the news was sent out of Queue Client.java receive information, interface provides the interface between Chat.java m Platform: |
Size: 26624 |
Author:ZX |
Hits:
Description: delphi实现的bt下载器示例程序,带全部源码和BT协议
包中文件说明:
BTDemo.dpr, BTDemoF.pas, BTDemoF.dfm -- 一个简单的bt下载器,支持多个.torrent文件同时下载
btutils.pas -- 核心bt组件
DCP*.pas -- SHA算法源码(复制自DEC组件包)
InetUtils.pas -- 提供Internet下载的函数库
SimpleSocks.pas -- socket组件(TCP)
SortLists.pas -- 排序的List组件
ThreadTimer.pas -- 定时器与线程池
DelayLists.pas -- 一个延时5秒再释放Object的队列
FastShareMem.pas, MemPools.pas, ShareGlobals.inc -- 由ThreadTimer内部使用
Bit Torrent Specification.htm -- BT协议文档-realized bt download procedures for example, with all source code and BT agreement package documents : BTDemo.dpr, BTDemoF.pas. BTDemoF.dfm-- a simple bt downloader, supports multiple. torrent download documents btutils.pas-- the core components bt DCP*. pas-- SHA algorithm source code (copied from the DEC kits) InetUtils.pas-- providing Internet download library SimpleSocks.pas-- socket Group pieces (TCP) SortLists.pas-- Ranking List components ThreadTime r.pas-- and the timer thread pool DelayLists.pas-- a delay the release of another five seconds O return of the queue FastShareMem.pas, MemPools.pas. ShareGlobals.inc-- ThreadTimer internal use by Tor Bit rent Specification.htm-- BT agreement document Platform: |
Size: 58368 |
Author:vvyang |
Hits:
Description: 这是一个模拟电信计费的程序,非常详细,运用了线程池、消息队列和socket编程等技术。-This is a simulation of telecommunications billing procedures, very detailed, using the thread pool, Message Queue and socket programming technology. Platform: |
Size: 46080 |
Author:Benson |
Hits:
Description: 可以通过socket传输对象 主要是将传输的队列进行序列化 就可以轻松实现对象的传输-through socket transmission main targets is to transfer the sequence of queue can be easy to achieve As transmission Platform: |
Size: 2048 |
Author:悲愁 |
Hits:
Description: 由delphi实现的bt下载器示例程序,带全部源码和BT协议
包中文件说明:
BTDemo.dpr, BTDemoF.pas, BTDemoF.dfm -- 一个简单的bt下载器,支持多个.torrent文件同时下载
btutils.pas -- 核心bt组件
DCP*.pas -- SHA算法源码(复制自DEC组件包)
InetUtils.pas -- 提供Internet下载的函数库
SimpleSocks.pas -- socket组件(TCP)
SortLists.pas -- 排序的List组件
ThreadTimer.pas -- 定时器与线程池
DelayLists.pas -- 一个延时5秒再释放Object的队列
FastShareMem.pas, MemPools.pas, ShareGlobals.inc -- 由ThreadTimer内部使用
Bit Torrent Specification.htm -- BT协议文档
采用TCP打洞~!-Delphi achieved by browser bt download sample procedures, with all the source and BT agreement documentation package: BTDemo.dpr, BTDemoF.pas, BTDemoF.dfm- a simple bt download, and supports multiple. Torrent file to download at the same time btutils.pas- core bt components DCP*. pas- SHA algorithm source code (copy from the DEC Package) InetUtils.pas- to provide Internet download library SimpleSocks.pas- socket components (TCP) SortLists . pas- sort of the List components ThreadTimer.pas- timers and thread pool DelayLists.pas- a delay the release of five seconds and then Object queue FastShareMem.pas, MemPools.pas, ShareGlobals.inc- from ThreadTimer the internal use of Bit Torrent Specification.htm- BT agreement document using TCP holes ~! Platform: |
Size: 90112 |
Author:杨晓波 |
Hits:
Description: 包含几个用不同方式(共享内存、socket、FIFO、消息队列等)实现进程通信的小程序,包含详细注释,足以解释各种方式进程通信的实现原理和编程方法-Contains a number of different ways (shared memory, socket, FIFO, message queue, etc.) to achieve the process of the small communications program, including detailed notes, are sufficient to explain the various ways the realization of the process of communication theory and programming methods Platform: |
Size: 10240 |
Author:Rain |
Hits:
Description: 基于linux操作系统下的socket编程,完成一个简单聊天工具。服务器端首先:向内核申请一个socket。第二绑定地址到socket上,地址包括主机、端口。第三在socket上,允许接入呼叫并设置队列长度为1.第四等待/接受呼叫。第五传输数据(及可以聊天)。
客户端:第一向内核请求建立socket 第二与服务器相连。第三传输数据
-Linux operating system based on the socket programming, to complete a simple chat tool. Server-side First of all: to the kernel for a socket. Bind address to socket on the second, address, including the host, port. Third in the socket, allowing access to the call and set the queue length is 1. 4th to wait for/receive calls. 5th transmit data (and you can chat). Client: first to the kernel requests the establishment of a second socket connected with the server. Third transmission of data Platform: |
Size: 14336 |
Author:zhangwei |
Hits:
Description: C#实现多线程网络通讯
整个系统由三个核心线程组成,并由.NET线程池统一管理:
侦听客户端连接请求线程:ListenClientRequest(),循环侦听客户端连接请求。如果有,检测该客户端IP,看是否是同一观测设备,然后建立一个客户端TSession对象,并通过Socket异步调用方法BeginReceive()接收数据包、EndReceive()处理数据包
数据包处理线程:HandleDatagrams(),循环检测数据包队列_datagramQueue,完成数据包解析、判断类型、存储等工作
客户端状态检测线程:CheckClientState(),循环检查客户端会话-C# multi-threaded network communication system is composed of three core thread throughout the composition, by the. NET thread pool unified management: a client connection request listening thread: ListenClientRequest (), loop listening client connection request. If you have, testing the client IP, to see if the same observation equipment, and then create a client-side TSession object, and through Socket asynchronous call methods BeginReceive () to receive data packets, EndReceive () processing of data packet data packet processing threads: HandleDatagrams ( ), cyclic test data packet queue _datagramQueue, the completion of the packet parsing to determine the type, storage, etc. the client state detection thread: CheckClientState (), loop checks the client session Platform: |
Size: 10240 |
Author:鸣鸣 |
Hits: