基于TCPIP的局域网聊天室的设计与实现

上传人:woxinch****an2018 文档编号:38982740 上传时间:2018-05-10 格式:DOC 页数:36 大小:1.21MB
返回 下载 相关 举报
基于TCPIP的局域网聊天室的设计与实现_第1页
第1页 / 共36页
基于TCPIP的局域网聊天室的设计与实现_第2页
第2页 / 共36页
基于TCPIP的局域网聊天室的设计与实现_第3页
第3页 / 共36页
基于TCPIP的局域网聊天室的设计与实现_第4页
第4页 / 共36页
基于TCPIP的局域网聊天室的设计与实现_第5页
第5页 / 共36页
点击查看更多>>
资源描述

《基于TCPIP的局域网聊天室的设计与实现》由会员分享,可在线阅读,更多相关《基于TCPIP的局域网聊天室的设计与实现(36页珍藏版)》请在金锄头文库上搜索。

1、学学 士士 学学 位位 论论 文文基于TCP/IP的局域网聊天室的设计与实现姓姓 名:名:学学 号:号:指导教师:指导教师:学学 院:院:专专 业:业:完成日期:完成日期:学学 士士 学学 位位 论论 文文基于TCP/IP的局域网聊天室的设计与实现姓姓 名:名:学学 号:号:指导教师:指导教师:学学 院:院:专专 业:业:完成日期:完成日期:摘 要随着计算机网络技术的发展,各种各样基于网络的应用也随之诞生,比如基于互联网的信息发布,通信,数据共享等等。局域网的发展也同样迅速。很多政府机构,企业,学校,都是先以一个统一的局域网联结在一起,再分别接入 INTERNET.因此基于局域网的即时通信工具

2、,就这样应运而生了。所以本文提出了一个更加合理的设计,并在 WINDOWS 平台上加以了实现.在本实现内将客户端和服务端综合在一个程序之内,用多线程实现不同的并行任务。并进行了人性化的界面设计,使用起来更加简单方便,并且功能十分合理,又易于扩展以及个性化定制。本文通过局域网聊天系统来具体共享内存实现进程间的数据交换,利用 windows 消息机制实现进程间的同步,两种机制结合使用。局域网聊天室作为一种新型的聊天工具可以提供更为及时、可靠、突破了必须有外界网络接入等优点,具有极其广泛的发展前景。本文介绍了采用 JAVA 编程开发局域网聊天系统的一套比较常用的解决方案。采用 TCP 模式进行文字聊

3、天, 在客户端之间点对点(C/C)的进行。本系统采用典型的 C/S(客户端/服务器)的框架模式,在该方案中采用Socket(套接字)原理实现网络通信,最终实现了通过服务器中转的文字聊天、文件传输功能,从而大大降低了程序的开发难度。本系统主要包括登陆、聊天、好友列表和服务器管理几个部分。本系统从需求分析、系统的设计、功能的实现都严格遵循了软件工程设计的思想。【关键词】Socket;TCP/IP;C/S;局域网聊天室AbstractWith the development of computer network technology, a variety of Web-based applicat

4、ions also will be the birth, such as Internet-based information release, communications, data sharing, and so on. LAN development is quickly. Many government agencies, businesses, schools, are first linked together in a unified LAN, respectively connected to the INTERNET, LAN-based instant messaging

5、 tool, and thus came into being. In this paper, a more rational design, in WINDOWS platform to achieve integrated in this realization of the client and server in different parallel tasks within a program, multi-threaded. And the design of user-friendly interface, easy to use and very reasonable, and

6、 easy expansion and customization. LAN chat system to a specific shared memory data exchange between process and use the windows message mechanism to achieve inter-process synchronization, the two mechanisms used in conjunctionLAN chat room as a new chat tool that can provide the advantages of more

7、timely, reliable, broke the need of outside network access, has a very wide range of development prospects.This article describes a JAVA Programming LAN chat system, a more common solution. TCP mode, text chat, peer-to-peer (C / C) between the client. The system uses the framework of a typical C / S

8、 (Client / Server) mode, the program using the Socket (socket) the principle of network communication, and ultimately the transit through the server, text chat, file transfer capabilities, which greatly reduces the difficulty of program development.The system includes landing, chat, friend lists, an

9、d server management of several parts. The system needs analysis, system design, the realization of functions strictly follow the idea of software engineering.【Key words】Socket;TCP/IP;C/S;Local Area Network Chat Room目 录第 1 章引言.11.1 课题背景.11.2 国内外研究现状.21.3 主要内容.3第 2 章 局域网聊天室系统分析.42.1 系统需求分析.42.1.1 功能需求

10、 .42.1.2 系统基本流程图 .42.1.3 性能要求 .52.1.4 测试环境规定 .52.2 可行性研究.52.2.1 成本可行性分析 .52.2.2 技术可行性分析 .62.3 系统开发环境的分析.62.4 数据流图.62.4.1 顶层数据流图 .62.4.2 一层数据流图 .6第 3 章 系统设计.73.1 设计目标.73.2 构建开发环境.73.3 系统模块流程图.83.4 系统功能模块图.9第 4 章 基于 Eclipse 的聊天室的分析与设计.104.1 TCP 套接字的运用.104.2 TCP 三次握手协议.114.3 程序结构.114.3.1 多用户在线方案 .114.3.2 软件框架 .124.4 代码实现.124.4.1 用户登陆模块 .124.4.2 用户列表模块 .144.4.3 文本聊天模块 .164.4.4 文件传输模块 .18第 5 章 局域网聊天室系统测试.215.1 系统测试结果与分析.215.1.1 用户登陆以及用户列表 .215.1.2 文本聊天 .225.1.3 文件传输功能 .255.2 本章小结.

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 其它相关文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号