1、 - 1 - 成人高等教育毕业设计(论文)成人高等教育毕业设计(论文) 题题 目目 局域网聊天软件局域网聊天软件 专专 业业 计算机网络应用专业计算机网络应用专业 班班 级级 2013 年年 - 2 - 摘 要 随着计算机网络技术的发展, 各种各样基于网络的应用也随之诞生,比如基于互 联网的信息发布,通信,数据共享等等。局域网的发展也同样迅速。很多政府机构, 企业,学校,都是先以一个统一的局域网联结在一起,再分别接入 INTERNET.因此 基于局域网的即时通信工具,就这样应运而生了。所以本文提出了一个更加合理的 设计, 并在 WINDOWS 平台上加以了实现.在本实现内将客户端和服务端综合在
2、一个程 序之内,用多线程实现不同的并行任务。并进行了人性化的界面设计,使用起来更 加简单方便,并且功能十分合理,又易于扩展以及个性化定制。 在实际的网络环境里,同一时间只对一个用户服务是不可行的。一个优秀的网 络服务程序除了能处理用户的输入信息,还必须能够同时响应多个客户端的连接请 求。在 Java 中,实现以上功能特点是非常容易的。 设计原理: 现代互联网不仅能给用户提供诸如搜索和电子邮箱等传统的信息服务,而且对 实时通信功能也有较好的支持。常见的实时通信软件都是基于 C/S 框架,要求客户 端在通信前先联入服务器,才能和其他的联入服务器的用户进行通信。而点对点的 通信则无需使用服务器,对个
3、客户端可以直接互相通信,使用更为方便。 主程序监听一端口,等待客户接入;同时构造一个线程类,准备接管会话。当 一个 Socket 会话产生后,将这个会话交给线程处理,然后主程序继续监听。运用 Thread 类或 Runnable 接口来实现是不错的办法。 关键词:局域网;即时通信;客户端;ServerSocket 类;多线程 - 3 - Abstract The Design and Implementation of LAN IM Abstract:Along with the high-speed development of the computer network technology
4、, various of applications based on network was born, like information releasing, data sharing . The development of the LAN is the same fast. Some governments, enterprises and schools constitute a LAN first ,then join into INTERNET. So the instant messenger in LAN was borned. So I make a new design,
5、and implement it on WINDOWS platform. In my implementation the client and the server were integrated in one program with multi thread mechanism. And had a good GUI, It was very easy to use it. And the function is very realizable. At last, it is also easy for expanding. In fact, there is only one ser
6、vice to the user which is not can be used.A good program of network service must can to answer many link request from the client when user input massages. So use JAVA to carry out these functions and particulars are very easy. Design Philosophy: Not only could the modern Internet to provide such as search and mail box traditional message service, but the real-time communication function also been well supported .The common software of the real-time communicat