基于JAVA的聊天系统的设计与实现.doc
本科毕业论文基于JAVA的聊天系统的设计与实现学院:机电工程学院专业:学号:姓名:指导教师:职称:论文提交日期:二八年四月摘要随着互联网的快速发展,网络聊天工具已经作为一种重要的信息交流工具,受到越来越多的网民的青睐。目前,出现了很多非常不错的聊天工具,其中应用比较广泛的有Netmeeting、腾讯QQ、MSN-Messager等等。该系统开发主要包括一个网络聊天服务器程序和一个网络聊天客户程序两个方面。前者通过Socket套接字建立服务器,服务器能读取、转发客户端发来信息,并能刷新用户列表。后者通过与服务器建立连接,来进行客户端与客户端的信息交流。其中用到了局域网通信机制的原理,通过直接继承Thread类来建立多线程。开发中利用了计算机网络编程的基本理论知识,如TCP/IP协议、客户端/服务器端模式(Client/Server模式)、网络编程的设计方法等。在网络编程中对信息的读取、发送,是利用流来实现信息的交换,其中介绍了对实现一个系统的信息流的分析,包含了一些基本的软件工程的方法。经过分析这些情况,该局域网聊天工具采用Eclipse为基本开发环境和java语言进行编写,首先可在短时间内建立系统应用原型,然后,对初始原型系统进行不断修正和改进,直到形成可行系统关键词:局域网聊天socketjavaAbstractAlongwiththefastdevelopmentofInternet,thenetworkchatingtoolhasalreadybecomeonekindofimportantcommunicationtoolsandreceivedmoreandmorewebcamsfavor.Atpresent,manyextremelygoodchatingtoolshaveappeared.forexample,Netmeeting,QQ,MSN-Messagerandsoon.Thissystemdevelopmentmainlyincludestwoaspectsoftheserverprocedureofthenetworkchatandthecustomerprocedureofthenetworkchat.TheformerestablishestheserverthroughtheSocket,theservercanreadanddelivertheinformationwhichclientsidesends,andcanrenovatetheuserstabulation.Thelattermakeaconnectionwiththeserver,carriesoncommunicationbetweentheclientsideandtheclientside.WiththeLANcorrespondencemechanismprinciple,throughinherittingtheThreadkindtoestablishthemultithreadingdirectly.Inthedevelopment,itusestheelementarytheoryknowledgewhichthecomputernetworkprogrammes.forexample,TCP/IPagreement,Client/Serverpattern,networkprogrammingdesignmethodandsoon.Inthenetworkprogramming,itrealizesreadingandtransmissionoftheinformation,thatis,informatonflowsrealizetheinformationexchange,introduceinformationflowanalysisforrealizingasystem,inwhichcontainessomebasicsoftwareengineeringmethods.Afteranalyzesthesesituations,thisLANchatingtooltakesEclipseasthebasicdevelopmentenvironmentandcompilesinjavalanguage.first,itwillestablishthesystemapplicationprototypeinashorttime.then,fortheinitialprototypesystem,itneedsconstantlyrevisedandimproved,untilaviablesystem.Keywords:LANChatSocketJava目录1.绪论011.1JAVA的网络功能与编程011.1.1JAVA概述021.1.2JAVA的特点041.1.3JAVA语言在网络上的应用071.2JavaBeans技术081.3IP/TCP协议常识081.4Socket的简介092.规划设计112.1课题来源112.2需求分析113.系统分析与设计方案123.1聊天系统的总体设计要点123.2聊天系统的设计步骤及功能模块划分123.3功能模块结构图134.系统设计环境与测试264.1开发环境和工具264.2硬件环境264.3聊天系统的测试265.毕业设计总结285.1毕业设计总结和展望285.2经验和感想28致谢30参考文献31