文件名称:A_simple_chat_tool
介绍说明--下载内容来自于网络,使用问题请自行百度
一个简单的用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
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
(系统自动生成,下载前可以参看下载内容)
下载文件列表
server.bat
chat.jar
client.bat
readme
www.dssz.com.txt
chat.jar
client.bat
readme
www.dssz.com.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.