Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - create object
Search - create object - List
一个简单的用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
Date : 2008-10-13 Size : 26.68kb User : ZX

一个简单的用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
Date : 2026-01-10 Size : 26kb User : ZX

DL : 0
本例子介绍如何用 IURLSearchHook 接口来定义自己的URL协议。当浏览器企图去打开一个未知协议的URL地址时,浏览器首先尝试从这个地址得到当前的协议,如果不成功,浏览器将创建在系统中注册的URL Search Hook对象并调用每一个对象的Translate方法,直到地址被转换或所有的URL Search Hook都尝试过。-This example describes how to interface with IURLSearchHook define your own URL protocol. When a browser attempts to open a URL address unknown protocol, the browser first of all try to get this address from the current agreement, if unsuccessful, the browser will create in the system register the URL Search Hook objects and call each object Translate method, until the address is converted or all of the URL Search Hook were tried.
Date : 2026-01-10 Size : 34kb User : pudncom12

DL : 0
CSocket继承于CAsyncSocket。是Windows Socket API的高层抽象。它通常要和CSocketFile及CArchive这两个类混合使用。后者两个类主要负责的是数据的发送和接收。Csocket提供了阻塞方式的访问方式,阻塞方式的意思就是在发送出去消息后要等到对方返回信息后才发送下一个数据包的通信信息。要使用CSocket对象首先要调用构造函数,然后调用Create函数创建一个Socket句柄。Create函数缺省创建一个流Socket,如果你没有在使用Carchive类,那么还可以创建一个数据报Socket。在服务器端调用Accept,在客户端调用Connect,然后创建一个CsocketFile去关联Csocket。下一步就是要创建一个Carchive对象关联CsocketFile,用来传输数据和接受数据。-CSocket inherited from CAsyncSocket. Windows Socket API is a high-level abstraction. It is usually two and CSocketFile and CArchive class of mixed use. The latter two categories is mainly responsible for sending and receiving data. Csocket provides a way of blocking the access way, blocking the way meaning is to send out a message to wait until after the other return information before sending the next packet communications. To use the CSocket object should first call the constructor and then call the Create function to create a Socket handle. Create function to create a default flow Socket, if you are not using Carchive class, you can also create a Datagram Socket. On the server side call Accept, the client calls the Connect, and then to create a CsocketFile associated Csocket. The next step is to create a Carchive object associated CsocketFile, used to transmit data and receive data.
Date : 2026-01-10 Size : 13.33mb User : yang zhijun
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.