网络通讯在当今已经不算新鲜事物,但大多数网络通讯都需要借助Internet上的服务器,这就给那些具有大规模内部网络的用户造成了许多问题,如浪费网络资源、遭遇到网络攻击、传播的病毒、破坏防御系统等等。由于互连网上的网络通讯工具给企业内部信息交流带来了不便,所以为了方便内部网络的用户之间的沟通,需要开发一个基于局域网的信息收发系统的即时通讯工具,实现在内部网络中进行信息的交流。本课题设计主要针对局域网通讯而开发设计的,采用的是C/S构架,类似飞鸽传书系统,来实现聊天、文件传输功能,并借助一些网络通讯组件,成功的实现了在局域网上的即时通讯。
本论文的目标是设计一个类似飞鸽传输的局域网通信软件,并分析它在其领域的优势。本设计以C编写,能在windows 2000/net/xp等环境下运行。设计共分为五大模块,分别是:首先,介绍选题背景及意义和国内外研究现状;其次,介绍TCP/IP点对点协议技术,C/S架构和SOCKET网络编程技术;再次,对当前局域网文件传输进行需求分析并提出解决方案;然后,根据解决方案对系统进行设计;最后,对工作计划统计以及分析系统进行测试并得到测试结果。
关键词:聊天;传输;socket;飞鸽传书;C/S结构
Design and Implementation IP Messenger Based on LAN
Abstract
The network communication already do not calculate the new things now, but the majority network communication all need to be support by the server on the Internet, this make these user have the large-scale internal network who many problems, such as waste network resources, be attacked by network, dissemination virus, destruction defense system and so on. Because the interconnection network communication facilities on the interior communication brought inconveniently for the enterprise, in order to facilitate internal communication between network user's, needs to develop one based on the local of instant message area network information receiving and dispatching system instant message facilities, realizes carries on the information which network the exchange. This topic design mainly aims at the local area network communication to develop the design, uses is the C/S skeleton,like IP Messenger, for chat and files transmission.
LAN against the text chat, documents and folders transmission, the design of a fake IP Messenger of LAN software, and analyze it in their areas of advantage. The design is developed by C program it can make in the cnvironment of windows 2000/net/xp of topic selection, in the environment The design altogether divides into five big modules, respectively is: First, introduction selected topic background and significance and domestic and foreign research present situation; Second, introduces the TCP/IP point to point protocol technology; C/S construction technique and sockt network programming technology; Third, carries on the demand of the current local area network file transfer to analyze and propose the solution; Fourth, carries on the design according to the solution to the system; Fifth, statistic the work plan, awalys and test the system and obtains the testnesult.
Key words: Chat;transmission; socket; C/S skeleton;IP Messenger
目 录
论文总页数:20页
1 引言 1
1.1课题背景 1
1.2本课题主要研究背景 1
1.3本课题主要研究思路和方法 1
1.4研究项目的目的以及意义 2
1.5 WINSOCKET的寻址方式 2
2 系统需求分析 2
2.1系统设计目标 2
2.2系统总体需求分析 3
2.3组织结构的分析 3
2.3.1开发运行环境 3
2.3.2系统开发语言 4
3 理论知识 4
3.1 C/S软件架构技术 4
3.2 用户数据报协议(UDP) 4
3.3单播、广播、组播浅析 5
4 系统设计 5
4.1 文字聊天模块的整体构架 5
4.2 文件传输模块的主要流程图 6
4.3系统的主要功能模块 6
4.3.1文字聊天的主登录界面 6
4.3.2文字聊天信息的封装 9
4.3.3 聊天信息的加锁 10
4.3.4文件传输的界面 12
4.3.5用户密封或加锁传输文件 15
5 系统测试 17
5.1测试环境 17
5.2测试结果 17
结 论 17
参考文献 18
致 谢 19
声 明 20
1