本科毕业设计(论文)
题目名称:基于VC++的企业内部通信软件的设计与实现 学 院: 计算机科学与技术 专业年级: 计算机科学与技术 学生姓名: 班级学号: 指导教师:
二○一四 年 六 月 六 日
摘 要
八十年代初,美国政府的高级研究工程机构(ARPA)给加利福尼亚大学Berkeley分校提供了资金,让他们在UNIX操作系统下实现TCP/IP协议。在这个项目中,研究人员为TCP/IP网络通信开发了一个API(应用程序接口)。这个API称为Socket接口(套接字)。今天,SOCKET接口是TCP/IP网络最为通用的API,也是在INTERNET上进行应用开发最为通用的API。
随着网络技术的发展及人们生活的需求,网络通信已越来越受到人们的亲睐。本课题是开发一个基于UDP的企业内部通信系统,既可以应用于封闭的局域网环境下,也可以在互联网的环境下使用。本软件是基于VC++6.0开发的,采用软件工程的方法,应用了程序设计技术、网络技术,运用了WINSOCK相关API接口。WINSOCK 是在Windows进行网络通信编程的API接口,也是Windows网络编程的标准。研究的主要内容是如何利用套接字编写网络通信程序,主要完成了客户端的发送信息,发送图片与显示在线用户及多人聊天,文件传输等工作。文件传输功能是本软件系统的一个亮点,它可以让两个用户之间实现文件的传递。通过聊天工具的使用,让分布在不同地点、使用不同机器的一组用户能够及时进行信息交流,以达到信息共享的目的,从而提高工作或者生活效率。通过测试,本软件操作简单,灵活性好,运行也比较稳定,可以广泛使用。
关键字 : UDP;VC++6.0;WINSOCK;网络通信
I
Abstract
The early 80s, the U.S. government's Advanced Research Project agency (ARPA) to the University of California, Berkeley provided funding to enable them to achieve in the UNIX operating system, TCP / IP protocol. In this project, researchers for the TCP / IP Network Communication Development an API (application program interface). This API is called Socket Interface (socket). Today, SOCKET interface is a TCP / IP network of the most common API, is the INTERNET application development on the most common API.
With the development of network technology and the demand of people's life, network communication has been more and more get the favor of people. This topic is to develop an internal communication system based on UDP, local area network (LAN) can be used in a closed environment, also can be used under the environment of Internet. This software is based on vc + + 6.0 development, adopt the method of software engineering, application programming technology, network technology, using the WINSOCK API interface. WINSOCK is in Windows network communication programming API interface, also is the standard of Windows network programming.The main content of the research is how to use the socket network communication program, mainly completed the client sends a message, send pictures to show online users and many people chat, file transfer, etc.File transfer function is one of the highlights of this software system, it can realize the file transfer between two users.Through the use of chat, let distribution in different locations, a group of users will be able to use different machine exchange of information in a timely manner, in order to achieve the purpose of information sharing, so as to improve the efficiency of work or life.Through test, the software operation is simple, flexibility is good, operation is stable, can be widely used.
Key words:UDP;VC++6.0;WINSOCK;Network communication
II
目 录
摘 要 .............................................................. I Abstract ............................................................. II 第1章 绪 论 ........................................................ 1 1.1 课题选题背景 .................................................... 1 1.2 国内外现状分析和研究成果 ........................................ 1 1.3 课题研究内容及意义 .............................................. 2 第2章 相关技术概述 .................................................. 3 2.1 开发环境 ........................................................ 3 2.1.1 开发工具简介 ................................................ 3 2.1.2 Visual C++ MFC概述 .......................................... 3 2.2 WinSock网络编程 ................................................. 3 2.2.1 Socket简介 .................................................. 4 2.2.2 开发Windows Sockets网络通信程序的软、硬件环境 .............. 4 2.2.3 CSocket类编程模型 ........................................... 5 2.2.4 用VC6.0进行Windows Sockets程序开发的技术要点 .............. 5 2.3 TCP/IP协议概述 .................................................. 6 第3章 软件需求分析 .................................................. 7 3.1 需求分析 ........................................................ 7 3.1.1 功能需求分析 ................................................ 7 3.1.2 数据需求分析 ................................................ 7 3.1.3 性能需求分析 ................................................ 7 3.1.4 运行需求分析 ................................................ 8 3.2 可行性分析 ...................................................... 8 3.2.1 经济可行性分析 .............................................. 8 3.2.2 技术可行性分析 .............................................. 8 3.2.3 运行可行性分析 .............................................. 8 第4章 软件系统设计 .................................................. 9 4.1 概要设计 ........................................................ 9 4.2 基本框架设计 ................................................... 10 4.2.1 宏和数据结构的定义 ......................................... 10 4.2.2 程序配置文件 ............................................... 10 4.2.3 调试模块 ................................................... 10 4.2.4 主界面初始化 ............................................... 11 4.2.5 主界面布局 ................................................. 15