1、基于linux的聊天系统设计与实现信息管理与信息系统本科论文2015届本科毕业论文(设计)基于Linux的聊天系统设计与实现姓 名:_zz_系 别:_计算机与信息技术_专 业:_信息管理与信息系统_学 号:_xxxxxx_指导教师:_xx_2015年4月20日基于Linux的聊天系统设计与实现摘要 Linux是一种能运行于多种平台、源代码公开、免费、功能强大、遵循POSIX标准、与UNIX兼容的操作系统。Linux自20世纪中期以来一直在突飞猛进地发展,人们在计算机软件开发和应用中越来越离不开它。Linux的诞生和发展给全球的软件业带来了新的机遇,也使微软的Windows操作系统面临有史以来最
2、大的挑战。由于Linux属于自由软件,它的源代码是公开的,并遵循通用公司公共许可证(General Public Licence,GPL),所有用户可以免费使用,从而使Linux在极短的时间内就成了一套成熟而稳定的操作系统。全世界成千上万的程序专家和Linux爱好者正在通过Internet不断地对Linux进行开发、完善和维护。 Linux操作系统核心最早是1991年由芬兰的Linus Torvalds在芬兰赫尔辛大学上学时发布的(那年Torvalds年仅25岁),后来经过众多世界顶尖的软件工程师的不断修改和完善,Linux得以在全球普及开来,在服务器领域及个人桌面得到越来越多的应用,在嵌入式
3、开发方面更是具有其他操作系统无可比拟的优势,并以每年100%的影虎数递增,显示了Linux强大的实力。 基于资源共享和软件自由的思想,linux成为越来越多技术人员的理想之国。作为一个稳定的多用户类unix网络操作系统,linux能提供完美的网络解决方案,出色的胜任网络构建和维护。出于对unix技术优势的出色继承和延续,linux对多种网络协议的支持使得网络解决方案极大的丰富。 在 Linux 中的网络编程是通过socket接口来进行的,Socket是TCP/IP网络的API。不但是一种特殊的I/O,它也是一种文件描述符。socket有TCP和UDP两个协议,TCP协议有数据的可靠性、应用的实
4、时性、网络的可靠性三个优点。因此选择TCP协议更为可靠。本系统实现了在Linux网络聊天室的基本功能。在Linux下编写并调试服务器端程序和客户端程序,实现了客户、服务器之间的连接和通信。可以在单机上开辟两个窗口分别运行客户、服务器端的程序,或者两台主机链接分别作为客户和服务器的方式。该系统主要实现了编辑信息、换行、查询历史记录、发送及关闭等主要功能。Linux是类UNIX计算机操作系统的名称。Linux操作系统内核的名称也是“Linux”。Linux操作系统是自由软件和开放源代码发展中最著名的例子。严格来讲,Linux这个词本身只表示Linux内核,但实际上,人们已经习惯了用Linux来形容
5、整个基于Linux内核并且用GNU工程各种工具和数据库的操作系统。基于这些组件的Linux软件被称为Linux发行版。一般来说,一个Linux发行包包含大量的软件,比如软件开发工具、数据库(如MySql)、网络服务器、Xwindows、桌面环境、办公包、脚本语言,等等。Linux现在是个人计算机和工作站上的UNIX类操作系统。它不仅继承了UNIX的特征,而且在许多方面超过了UNIX。大量的高级程序设计语言已移植到Linux系统上,因而使它成为理想的应用软件开发平台,而且,在Linux系统下开发的应用程序具有良好的可移植性。Linux拥有广泛的应用前景。该聊天系统主要实现功能有:编辑信息、换行、
6、查询历史记录、发送及关闭等主要功能。不同于之前分小组做过的系统的区别是,本次建立的系统是作者自己依据在洛阳惠普基地所学得的知识,结合平时所做的实验,总结教训和失误之处,自行完成的系统。本人觉得更有意义。关键字:Linux;Socket;C语言;TCP;GCC;MySQL.Design and implementation of the chat system based on LinuxAbstract Linux is a kind of can run on a variety of platforms, open source, free, powerful, follow the PO
7、SIX standard, and UNIX compatible operating system. Linux since mid twentieth Century has been the development of make a spurt of progress, people are in the computer software development and application cannot do without it. The birth and development of Linux has brought new opportunities for the g
8、lobal software industry, also makes the Windows operating system Microsoft faces its biggest challenge. Because Linux is free software, its source code is open, and follow the General Company Public License (General Public Licence, GPL), all the users can use free of charge, so that the Linux in a v
9、ery short period of time has become a mature and stable operating system. The whole world tens of thousands of program expert and Linux enthusiasts are through Internet, constantly on the Linux to develop, improve and maintain. Linux operating system is the core of the earliest Finland in 1991 by th
10、e Linus Torvalds in Finland Helsinki University School (Torvalds released that year only 25 years old), after many of the worlds top software engineers constantly revised and improved, Linux was able to spread around the world, has been used more and more in the field of personal server and desktop,
11、 in embedded development is more with other operating system There is nothing comparable to this advantage, and increase to the number of shadow tiger every year 100%, shows the Linux strength. On the basis of the thought with free resource-sharing and software, linux becomes more and more technical
12、 staffs ideal country.and is attracting more persons to join in this ideal constantly.As a steady multi-user unix network operating system, linux can offer the perfect network solution and is competent of constructing and maintaining the network excellent.For the inheritting and extending splendidly
13、 of technological advantage to unix, the abundance that linux support to many kinds of procotols makes the network with great solution. In Linux, network programming is carried out through the socket interface,Socket is the API of TCP/IP network.Not only Is a special I/O but also is a file descripto
14、r.Socket has two protocols which are TCP and UDP,TCP protocol has three advantages of the eliability of data, the application of real-time and the network reliability.So it is more reliable to choose TCP protocol. The system Implementate the basic function of the network chat room under linux. Prepa
15、red and debugging server and client program in the Linux. Can open up two windows In a single machine to run the server and client program respectively,or to connect twohosts, respectively, as the way of the client and server.This system mainly realizes the editing information query, newline, main f
16、unction of history, sending and close etc.Keywords: Linux;Socket;C Language;TCP;GCC;MySQL.1 引言1.1 背景 在这个人才如潮涌般的世界,系统界的先驱Windows系统已经不能满足越来越多的开发人员的需求。Linux系统由于其优越的自身条件,能运行于多种平台、源代码公开、免费、功能强大、遵循POSIX标准、与UNIX兼容的操作系统等诸多优势,越来越受到开发人员的青睐。本次选课的内容选择这个系统开开发聊天工具也是因为这个原因。1.2 选课意义 Linux是一种能运行于多种平台、源代码公开、免费、功能强大、遵循POSIX标准、与UNIX兼容的操作系统。Linux自20世纪中期以来一直在突飞猛进地发展,人们在计算机软件开发和应
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1