毕业设计论文 基于JAVA局域网聊天软件
基于JAVA局域网聊天程序设计与实现(附源代码)

局域网聊天课程设计摘要随着互联网的发展,网络聊天工具作为一种交流工具,已经受到网民的青睐。
目前,出现了很多功能强大的聊天工具,其中应用比较广泛的有腾讯QQ、MSN-Messager等等。
即时通讯软件,是每一个上网用户都需要的工具,它除了能够让您迅速地在网上找到自己的朋友和伙伴之外,还可以实时交谈和传递信息,截止到目前,全球约有近3亿多人使用即时软件,正因为即时通讯软件拥有数以亿计的用户和增长的市场,所以各个公司都盯上了这个最大的市场,一时间,即时通讯市场硝烟四起。
对等网络(peer-to-peer,简称P2P),应用最初出现时和现在并不相同。
事实上可以认为它是若干不同技术以及流行趋势相结合的产物。
以下是导致P2P技术发展最重要的趋势:首先,一些新技术与软件工程的结合,形成了一种将工作分散的趋势。
P2P计算正是这种分散工作趋势的结果。
其次,在企业应用集成等因素的驱动下,过去十年渐渐形成从集中的单机系统转向分布式系统。
然而随着互联网的发展,全面的分布式计算也就成为一种迫切需求。
关键词:局域网聊天 P2P javaAbstractWith the development of the Internet,the chat tool as a communication tool, has been popularly accepted by netizens of all ages. At present, there are many powerful chat tools, of which Tencent QQ, MSN-Messager are much more prevalent.Instant messaging software is necessary for every one who connects to the internet, which can not only provide you a prompt way to find friends and partners online, but can provide you the convenience of internet relay chat and information delivering. Up to now, there are about 300 million people using real-time software all over the world. As more and more corporations have focused on this market with growing potential, which has hundreds of millions of uses, the competitions among these corporations are extremely fierce.The initial application of peer-to-peer network (peer-to-peer, referred to as P2P) is not the same as it is now. In fact, it can be regarded as a combination of different technologies and fashion trends. Below are the most important trends that have led the development of P2P technology: First of all, the integration of software engineering and new technologies led to a working dispersion trend. As a result, P2P computing was born. Then, in the past decade, it has turned fro m a single centralized system to distributed system due to the motivation of factors such as enterprise application integration. At last, with the development of the Internet, however, a comprehensive distributed computing has become an urgent need.Keywords:LAN chat P2P java局域网聊天课程设计目录摘要 (i)Abstract ..................................................................................................................................... i i 1绪论 . (1)1.1JAVA的网络功能与编程 (1)1.1.1JAVA概述 (1)1.1.2 JAVA的特点 (3)1.1.3 JAVA语言在网络上的应用 (5)1.2J AVA B EANS技术 (6)1.3IP/TCP协议常识 (6)1.4S OCKET的简介 (7)1.5对等网络 (8)1.5.1 对等网络发展历史 (8)1.5.2 对等网络的概念 (9)1.5.3 对等网络的主要系统结构 (9)2 JAVAqq局域网聊天程序的需求分析 (13)2.1课题来源 (13)2.2需求分析 (13)3 JAVAqq局域网聊天程序的系统分析与设计 (15)3.1JAVA QQ局域网聊天程序的总体设计要点 (15)3.2JAVA QQ局域网聊天程序的设计步骤及功能模块划分 (15)3.3JAVA QQ局域网聊天程序各功能模块 (16)4 JAVAqq局域网聊天程序的设计与实现 (24)4.1开发环境工具 (24)4.2硬件环境 (24)4.3聊天系统功能模块的测试 (24)结论 (27)致谢 (29)参考文献 (30)附录 A 程序源代码 (31)1绪论随着互联网逐步普及,互联网技术的逐步提高。
基于JAVA的局域网聊天系统开发

摘要随着计算机网络技术的发展,各种各样基于网络的应用也随之诞生,比如基于互联网的信息发布,通信,数据共享等等。
局域网的发展也同样迅速。
很多政府机构,企业,学校,都是先以一个统一的局域网联结在一起,再分别接入INTERNET.因此基于局域网的即时通信工具,就这样应运而生了。
本文利用JA V A的UDP编程以及SWING图形界面编程技术,在WINDOWS平台上实现了具有美观图形界面的局域网聊天软件.在本实现内将客户端和服务端综合在一个程序之内,用多线程实现不同的并行任务。
并模仿国内的QQ进行了人性化的界面设计,使用起来更加简单方便,并且功能十分合理、实用。
通过本局域网聊天软件可以实现一对一、一对多的聊天,可以实现不同用户不同的文字字体、风格、大小、颜色的发送和显示,提供发送表情、文件、好友间的抖动提示以及聊天记录的管理等功能。
关键词:局域网聊天;JA V A网络编程;UDP;多线程LAN Chat System Development based on JAVAAbstractWith the development of computer network technology, various kinds of applications based on network were born, such as the release of information, communication, data sharing based on the Internet and so on. The development of the LAN is also quick. Many government agencies, enterprises, schools, is the first in a unified network linked together, each with access to INTERNET. Thus Instant Communication Tools based on LAN were born. In this paper, by using JA V A UDP programming and SWING graphical interface programming technology, we can get a LAN chat software with beautiful appearance on the WINDOWS platform.In the implementation, the client and the server were integrated within a program, implemented with multithreading. And imitating the domestic QQ interface humanization design, using more simple and convenient, and the function is very reasonable, practical.Through our LAN chat software can achieve one to one, one to many chat, send different users’ different text font, style, size, color and display, provide the send of expression, file, the shake among friends and chat records management and other functions.Keyword: LAN Chat;JA V A network programming;UDP; multi-thread目录摘要 (I)Abstract ............................................................................................................................................. I I 第一章前言 (1)第二章系统可行性分析 (2)2.1 成本可行性分析 (2)2.2 技术可行性分析 (2)第三章需求分析 (3)3.1 功能需求分析 (3)3.2性能需求分析 (3)3.3 系统主要技术分析 (3)3.2.1 JAVA DatagramSocket (3)3.2.2 JAVA MulticastSocket (4)3.2.3 JAVA Swing (5)3.4 系统开发、运行环境分析 (5)第四章系统概要设计 (6)4.1 系统功能模块设计 (6)4.2 系统数据流图 (9)第五章系统详细设计 (10)5.1 详细设计概述 (10)5.2 系统详细设计 (10)5.2.1登陆界面 (10)5.2.2用户主界面 (14)5.2.3聊天界面 (16)5.2.4辅助工具类 (19)第六章系统实现 (21)6.1 总体工程架构的实现 (21)6.2 具体功能实现 (21)结论 (24)参考文献 (25)第一章前言第一章前言近年来,随着全球信息化进程的不断发展,网络也在飞速发展。
JAVA 局域网聊天软件毕业设计

局域网实时通讯系统设计学生:陈曲指导教师:罗万可内容提要近年来,Java作为一种新的编程语言,以其简单性、可移植性和平台无关性等优点,得到了广泛地应用,特别是Java与WWW的完美结合,使其成为网络编程和嵌入式编程领域的首选编程语言。
Eclipse是用于快速开发Java应用的一款优秀的集成开发环境,它以其友好的开发界面、强大的组件支持等优点,得到广大程序员的接受和认可。
本文在介绍Java和Eclipse相关技术和国内外发展现状的基础上,对“局域网实时通讯”系统的整个生命周期的各个开发阶段进行了详细地介绍。
首先,分析了开发本系统的可行性,重点分析本设计所采用的技术的可行性。
其次,从系统主界面、信息传送、文件传送以及语音、视频、JMF多媒体功能等几方面,分析了本系统的功能需求;从可使用性和安全性方面分析了属性需求。
然后,进行了系统的概要设计和详细设计,这也是本文的重点。
详细设计介绍了Java2标准运行环境的配置,重点给出各个类模块的程序流程图以及UML图,列表介绍了各个类包含的变量、使用的方法,展示了系统的界面。
为了保证程序代码的正确性和功能实现的可靠性,本文还介绍了软件的程序调试和功能测试结果,并且对本设计的成果和不足进行了总结。
最后,本文还提出软件的维护措施。
关键词:Java Eclipse通讯传输多媒体LAN real-time communicationSummary: In recent years, Java as a new programming language for its simplicity, portability and platform independence, etc., has been widely used, especially in the perfect combination of Java and the WWW, making it a network programming and embedded programming, the preferred programming language. Eclipse is used for rapid development of Java applications, an excellent integrated development environment, it is the development of its friendly interface, powerful component support, etc., to be accepted and recognized by the general programmer.This paper introduces the Java and Eclipse-related technologies and the development of the status quo at home and abroad, based on the "LAN real-time communication" system throughout the life cycle of all phases of development carried out a detailed introduction. First, the analysis of the feasibility of developing the system, focusing on analysis of the technology used in this design is feasible. Secondly, from the system main interface, messaging, file transfer, as well as voice, video, JMF several aspects such as multimedia features, analysis of the system's functional requirements; from usability and security requirements in terms of analysis of properties. Then, a systematic summary of the design and detailed design, which is the focus of this article. Detailed design describes the standard Java2 runtime environment configuration, with emphasis given in each class module of the program flow chart and UML diagrams, the list describes the variables included in each class, the methods used to demonstrate the system interface. In order to ensure the correctness of program code to achieve the reliability and functionality, this paper also describes the game software debugging and functional test results, and the results of this design and shortcomings are summarized. Finally, this paper also proposed measures for software maintenance.Keywords: Java Eclipse Communications Transmission Media目录一、绪论 (1)(一)本设计的目的和意义 (1)(二)国内外研究现状 (1)(三)设计研究的主要内容、目标与工具 (2)1.设计的主要内容 (2)2.设计要达到的目标 (2)3.设计方法介绍 (3)二.可行性分析 (5)(一)可行性分析 (5)(二)可行性研究的前提 (6)1.要求 (6)2.目标 (6)3.条件、假定和限制 (6)4.对现有软件的分析 (7)(三)所建议的软件 (7)1.系统处理流程 (7)2.社会可行性分析 (7)3.技术可行性分析 (8)4. 经济可行性 (10)三、需求分析 (10)(一)任务概述 (10)1.目标 (10)2.用户的特点 (11)(二)具体需求 (11)1.功能需求 (11)2.主界面需求 (11)四、概要设计 (11)(一)系统功能 (11)(二)功能模块设计 (12)1.总设计模块的划分 (12)2.系统主界面模块 (12)(三)类模块设计 (13)(四)程序设计的重点 (13)(五)接口设计 (13)1.外部接口 (13)2.内部接口 (13)(六)故障处理 (14)五、详细设计 (14)(一)程序主结构 (15)(二)开发环境配置 (15)1.Java2的标准运行环境 (15)(1)J2SE SDK (15)(2)J2SE JRE (15)(3)J2SE Documentation (16)2.J2SE的安装与配置 (16)(1)安装过程 (16)(2)配置环境变量 (18)3.JMF安装 (22)(三)功能模块程序流程图 (22)(1)基本信息传送 (22)(2)文件传送 (22)(3)语音视频 (23)(4)远程协助 (23)(5)视频会议 (24)(四)系统界面展示 (24)六、软件测试 (27)(一)程序代码调试 (27)1.用正常数据调试 (27)2.异常数据调试 (27)3.用错误数据调试 (28)(二)程序功能测试 (28)1.模块功能测试 (28)2.确认测试 (28)七、软件维护 (29)结论 (29)参考文献 (31)局域网实时通讯系统一、绪论(一)本设计的目的和意义“局域网通信”具有广泛的用户群,在没有Internet接入到局域网时候,我们的通信主要靠局域网通信,但是先阶段有关局域网通信系统很少,对每一个Java语言设计者进行语言提高和进阶都是一个很好的锻炼机会。
本科毕业论文-基于JAVA的聊天系统的设计与实现

摘要随着互联网的快速发展,网络聊天工具已经作为一种重要的信息交流工具,受到越来越多的网民的青睐。
目前,出现了很多非常不错的聊天工具,其中应用比较广泛的有Netmeeting、腾讯QQ、MSN-Messager等等。
该系统开发主要包括一个网络聊天服务器程序和一个网络聊天客户程序两个方面。
前者通过Socket套接字建立服务器,服务器能读取、转发客户端发来信息,并能刷新用户列表。
后者通过与服务器建立连接,来进行客户端与客户端的信息交流。
其中用到了局域网通信机制的原理,通过直接继承Thread类来建立多线程。
开发中利用了计算机网络编程的基本理论知识,如TCP/IP协议、客户端/服务器端模式(Client/Server模式)、网络编程的设计方法等。
在网络编程中对信息的读取、发送,是利用流来实现信息的交换,其中介绍了对实现一个系统的信息流的分析,包含了一些基本的软件工程的方法。
经过分析这些情况,该局域网聊天工具采用Eclipse为基本开发环境和java 语言进行编写,首先可在短时间内建立系统应用原型,然后,对初始原型系统进行不断修正和改进,直到形成可行系统关键词:局域网聊天 socket javaAbstractAlong with the fast development of Internet,the network chating tool has already become one kind of important communication tools and received more and more web cams favor. At present, many extremely good chating tools have appeared 。
for example,Netmeeting, QQ,MSN—Messager and so on. This system development mainly includes two aspects of the server procedure of the network chat and the customer procedure of the network chat. The former establishes the server through the Socket,the server can read and deliver the information which client side sends,and can renovate the users tabulation。
基于java的局域网聊天系统(可编辑)

基于Java的局域网聊天系统引论交流对于现代社会及其每个社会的成员都非常重要。
直接交流的方式有许多,包括语言交流、书面文字交流、肢体动作交流等,而远程通讯交流则还需借助于一些先进的高级工具,诸如移动电话、固定电话、网络等。
而本篇论文研究的则是网络即时通讯系统。
计算机网络技术发展到今天,已经非常的发达非常的普及了,网络带给人们的通讯交流方式也更加受到各个层次人们的青睐。
功能齐全的网络通讯交流设备不仅可以实现文本传输而且可以使人们进行音频视频的直观交流,在利用现代多媒体的技术的同时,它还有助于使用者对工作中各种信息进行分类和处理。
大家都知道,QQ是目前国内最火爆的网络通讯设备。
QQ最大的特点就是方便即时,只要记得对方的QQ号码,添加他为好友,就可以随时随地实现聊天、沟通、视频远程操作协助语音通话等功能,是比较现代化的通讯技术之一。
在现代信息科学技术社会,通讯系统推陈出新,功能强大。
该论文现在要探讨的即时通讯系统,是目标定位到企业内部网络,以方便解决企业公司内部的沟通交流等问题,可以大大提高企业公司的工作效率。
该通讯设备方便内部员工进行沟通交流,例如文字传送,语音聊天,视频通话等等。
该即时通讯系统由客户端程序与服务器端程序两部分组成,支持局域网和以太网。
而这样企业员工就可以在任何有网络覆盖的地方进行随时进行意见的交流和文件的传送等。
使人们不用浪费时间,花费金钱在固定的地点交流。
QQ等工具公共通讯系统,因为具有聊天内容和对象不可控的特点,可能会减低员工的工作效率。
由于该即时通讯系统用于企业内部,因此服务器端也安装在企业内部,并且只有系统管理员才能进行人员名称数目的创建,这样就助于更好的解决公共通讯系统存在的问题。
即时通讯具有良好的互动性,互动性可体现在人们在交流不同的问题意见时,发现听取对方的建议是效果更好。
通过使用及时通讯系统,人们可以在网络覆盖的地方和有电脑的情况下不借助其他外在设备,在线工作交流。
java基于tcpip协议的聊天工具的设计与开发-毕设论文

编号毕业设计(论文)题目基于TCP/IP协议的聊天工具的设计与开发二级学院计算机科学与工程专业计算机科学与技术班级 10903XXXX学生姓名学号 10903XXXXXX指导教师职称时间 2013.6目录摘要 (I)ABSTRACT (II)前言................................................................................................................................................................... - 1 -第一章概述..................................................................................................................................................... - 2 - 1.1 课题背景及意义................................................................................................................................... - 2 -1.1.1 课题背景...................................................................................................................................... - 2 -1.1.2 课题意义...................................................................................................................................... - 3 - 1.2 课题现状及发展................................................................................................................................... - 3 -1.2.1 课题现状...................................................................................................................................... - 3 -1.2.2 课题发展...................................................................................................................................... - 4 - 1.3 课题内容、目的及目标..................................................................................................................... - 4 -1.3.1 课题内容...................................................................................................................................... - 4 -1.3.2 课题目的和目标........................................................................................................................ - 4 -第二章开发技术和平台.............................................................................................................................. - 6 - 2.1 开发技术 ................................................................................................................................................ - 6 -2.1.1 Java语言..................................................................................................................................... - 6 -2.1.1.1 Java发展历程............................................................................................................... - 6 -2.1 1.2 Java特点........................................................................................................................ - 6 -2.1.1.3 Java与Internet......................................................................................................... - 7 -2.1.2多线程............................................................................................................................................ - 8 -2.1.3 TCP/UDP协议.............................................................................................................................. - 8 -2.1.4 C/S模式..................................................................................................................................... - 10 -2.1.5 Socket ........................................................................................................................................ - 11 - 2.2 开发平台 .............................................................................................................................................. - 11 -2.2.1 硬件环境.................................................................................................................................... - 11 -2.2.2 软件环境.................................................................................................................................... - 11 -2.2.2.1 Eclipse....................................................................................................................... - 11 -2.2.2.2 JDK1.6 ......................................................................................................................... - 12 -2.2.2.3 SQL Server 2005和JDBC .................................................................................... - 12 -2.2.2.4 AWT组件...................................................................................................................... - 12 -第三章系统分析与设计............................................................................................................................ - 13 - 3.1 系统分析 .............................................................................................................................................. - 13 -3.1.1 系统可行性分析...................................................................................................................... - 13 -3.1.2 系统功能需求........................................................................................................................... - 13 -3.1.3 系统实现原理........................................................................................................................... - 14 -3.1.4 各个模块功能详解 ................................................................................................................. - 15 -3.1.4.1 服务器端结构.............................................................................................................. - 15 -3.1.4.2 客户端结构 .................................................................................................................. - 16 - 3.2 系统设计 .............................................................................................................................................. - 17 -3.2.1 设计原则.................................................................................................................................... - 17 -3.2.2 架构设计.................................................................................................................................... - 17 -3.2.3 功能设计.................................................................................................................................... - 18 -3.2.4 数据库设计 ............................................................................................................................... - 18 -第四章系统的实现..................................................................................................................................... - 19 - 4.1 服务器的设计与实现 ....................................................................................................................... - 19 -4.1.1 服务器工作流程图 ................................................................................................................. - 19 -4.1.2 服务器主界面........................................................................................................................... - 19 -4.1.3 服务器的开启........................................................................................................................... - 21 -4.1.4 服务器的关闭........................................................................................................................... - 21 -4.1.5 服务器管理用户...................................................................................................................... - 21 - 4.2 客户端的设计与实现 ....................................................................................................................... - 27 -4.2.1 客户端工作流程图 ................................................................................................................. - 27 -4.2.2 客户端登陆主界面 ................................................................................................................. - 27 -4.2.3 客户端注册主界面 ................................................................................................................. - 28 -4.2.4 客户端聊天主界面 ................................................................................................................. - 32 -4.2.5 客户端之间聊天...................................................................................................................... - 33 -4.2.6 用户下线.................................................................................................................................... - 37 - 4.3 系统功能特点及改进 ....................................................................................................................... - 39 -第五章结论................................................................................................................................................... - 40 - 致谢................................................................................................................................................................. - 41 - 参考文献.......................................................................................................................................................... - 41 - 文献综述.......................................................................................................................................................... - 41 -摘要随着时代的进步,互联网日益变得普及和大众化。
毕业论文局域网聊天软件的设计与实现原理

摘要在网络越来越发达的今天,人们对网络的依赖越来越多,越来越离不开网络,由此而产生的聊天工具越来越多,例如,国外的ICQ、国内腾讯公司开发的OICQ。
基于Java网络编程的强大功能,本次毕业设计使用Java编写一个聊天系统。
一般来说,聊天工具大多数由客户端程序和服务器程序外加服务器端用于存放客户数据的数据库组成,本系统采用客户机/服务器架构模式通过Java提供的Socket类来连接客户机和服务器并使客户机和服务器之间相互通信,由于聊天是多点对多点的而Java提供的多线程功能用多线程可完成多点对多点的聊天,数据库管理系统用SQL Server2000完成并通过JDBC-ODBC桥访问数据库。
本系统建立在JAVA平台上,系统的设计使用了面向对象技术和面向对象的设计原则。
系统采用C/S结构,客户端与客户端以及客户端与服务器端之间通过Socket传送消息。
使用JAVA语言编写,开发工具采用Eclipse。
服务器端设计与实现过程中,采用了多线程技术,可以在单个程序当中同时运行多个不同的线程,执行不同的任务。
大大增强了程序对服务器资源的利用。
聊天系统完成后将可进行多人对多人的聊天,对好友进行添加、删除,对新用户的注册,发送消息、接受消息等等功能。
关键字:多线程;客户机/服务器;JAVA ; Socket ; Eclipse ; TCP/IPAbstractas the network become more and more developed, people become more and more lean to the network, and can not leave with out it. This caused the chat materials become more numerous, as the overseas ICQ system, the OICQ system that invented by Tencent Co., and so on. So we create a network chat medium just like the QQ.Java network programming based on the power, the use of Java designed to prepare graduates a chat system.In general, the majority of the chat tool for client and server program in addition to server-side storage of customer data for the database,the system uses a client / server architecture model the adoption of Java provided Socket class connect client and server and between the client and server communicate with each other, as the chat is to provide point-to-multipoint and multi-threaded Java function to be completed by using multi-threaded chat and more point-to-multipoint, database management system with SQL Server2000 the completion and adoption of JDBC-ODBC Bridge access the database.The system built on the JAVA platform, the system design using object-oriented technology and object-oriented design principles. System uses the C / S structure, client and client-side and server-side client and send messages through Socket. The use of JAVA language, development tools using Eclipse. Design and Implementation of server-side process, the use of multi-threading technology, which can process in a single run at the same time a number of different threads, the implementation of different tasks. Procedures greatly enhanced the use of server resources.Chat system will allow people to complete chat to more friends,and the system can add, delete somebody,can deal with new user registration, send messages, receive messages and so on.Keywords : Multithreading ;Client/Server ;JAVA ;Socket ;Eclipse ;TCP/IP目录1 绪论 (5)1.1国内外聊天系统的研究现状 (5)1.2J AVA语言 (6)1.2.1 Java的发展历史 (6)1.2.2 Java的特点 (7)1.2.3 Java与Internet (7)1.3S OCKET编程 (8)1.3.1 关于TCP/IP协议 (8)1.3.2 服务器和客户机 (9)1.4本文内容安排 (9)2 需求分析 (10)2.1可行性研究 (10)2.1.1 可行性分析 (10)2.1.2系统功能需求 (10)2.1.3 系统性能需求 (11)2.1.4 系统运行需求 (11)2.2数据流图 (11)2.2.1 顶层数据流图 (11)2.2.2 一层数据流图 (12)2.2.3 二层数据流图 (13)3 概要设计 (14)3.1系统实现原理 (14)3.2系统实现层次图: (15)3.3各模块详细功能 (15)3.3.1服务器端结构 (15)3.3.2 客户端结构 (16)4 详细设计 (17)4.1系统流程图 (17)4.1.1 系统总体流程图 (17)4.1.2 系统客户端流程图 (18)4.2编写服务器端程序 (18)4.2.1 问题陈述 (18)4.2.2 解决方案 (19)4.3客户端程序编写 (23)4.3.1 (23)4.3.2 用户登录 (23)4.3.3 聊天室 (24)参考文献 (30)致谢 (31)1 绪论1.1国内外聊天系统的研究现状目前国内外做聊天系统的公司很多,产品也琳琅满目,国内有诸如腾讯QQ、新浪UC、网易泡泡等,国外有著名的MSN(新版改名为Live Messenger)以及跨平台Gaim等。
局域网聊天软件课程设计_毕业设计

课程设计报告课程名称:《面向对象程序设计》课程设计题目:贵师院局域网聊天软件姓名:学号:组员:学院:数学与计算机科学专业:计算机科学与技术年级:2011级指导教师:二○一三年七月目录1.设计的目的 (1)2.设计的内容 (1)3.概要设计 (3)3.1局域网聊天QQ的功能 (3)3.2局域网聊天QQ的能模块如下: (3)4.详细设计 (5)4.1编写服务器端程序 (5)4.1.1问题陈述 (5)4.1.2解决方案 (6)4.2客户端程序编写 (7)5.总结 (8)6.参考资料 (8)7.附录 (8)摘要随着互联网的发展,人们对网络的依赖越来越多,越来越离不开网络,由此而产生的聊天工具越来越多。
本次实验将依照腾讯公司聊天工具QQ的设计,实现局域网网络通信的基本功能,以便在用户在不联网的情况下也可以进行通信。
本文所写的“贵师院局域网聊天软件”是为了解决师院为了解决广大师院同学们上网困难,网费透支,网速慢等困难。
该软件主要包括:服务器响应,登录系统,注册,好友界面,聊天界面等。
在这次的课程设计中,我们应用了MyEclipse 6.0开发工具在WINDOWS平台上开发了一个基于WINDOWS平台的局域网通信工具,我们充分学习了JAVA Swing和awt界面开发技术,使自己在界面应用和界面布局方面得到更多的实践,应用Socket技术实现网络的连接功能,对网络的实现和通信方面有了进一步的理解,多线程方面的应用,使得客户端和服务端可以实现多任务功能。
关键词:Java, MyEclipse, 通讯, 局域网,聊天AbstractWith the development of the Internet, people rely on network more and more, more and more inseparable from the network, the resulting chat tools, more and more. This experiment will be in accordance with the design of tencent chat tool QQ, realize the basic function of the LAN network communication, so that the users in the case of not connected to the Internet can also communicate.This article written by the "your LAN chat software college" is to solve in order to solve the general teachers college students surfing the Internet is difficult, net charge overdraft, network speed is slow and difficult. The software mainly includes: the server response, login system, registration, friend interface, chat interface, etc. In the curriculum design, we applied the MyEclipse 6.0 development tools in WINDOWS platform based on WINDOWS platform to develop a local area network (LAN) communication tools, we fully learned JAVA Swing and awt interface development technology, make oneself in the aspect of application interface and interface layout to get more practice, Socket technology is applied to implement the network connection, for the realization of the network and communications have a further understanding ofmulti-threaded applications, making the client and the server can implement multitasking capabilities.Keywords : Java, MyEclipse, communication, Local area network, chat1 引言随着Internet的发展,Internet将提供越来越多的服务。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
本科毕业论文(毕业设计)题目:局域网聊天摘要在网络越来越发达的今天,人们对网络的依赖越来越多,越来越离不开网络,由此而产生的聊天工具越来越多,例如,国外的ICQ、国内腾讯公司开发的OICQ。
基于Java网络编程的强大功能,本次毕业设计使用Java编写一个聊天系统。
一般来说,聊天工具大多数由客户端程序和服务器程序外加服务器端用于存放客户数据的数据库组成,本系统采用客户机/服务器架构模式通过Java提供的Socket类来连接客户机和服务器并使客户机和服务器之间相互通信,由于聊天是多点对多点的而Java提供的多线程功能用多线程可完成多点对多点的聊天,数据库管理系统用SQL Server2000完成并通过JDBC-ODBC桥访问数据库。
本系统建立在JAVA平台上,系统的设计使用了面向对象技术和面向对象的设计原则。
系统采用C/S结构,客户端与客户端以及客户端与服务器端之间通过Socket传送消息。
使用JAVA语言编写,开发工具采用Eclipse。
服务器端设计与实现过程中,采用了多线程技术,可以在单个程序当中同时运行多个不同的线程,执行不同的任务。
大大增强了程序对服务器资源的利用。
聊天系统完成后将可进行多人对多人的聊天,对好友进行添加、删除,对新用户的注册,发送消息、接受消息等等功能。
关键字:多线程;客户机/服务器;JA V A ;Socket ;Eclipse ;TCP/IPAbstractas the network become more and more developed, people become more and more lean to the network, and can not leave with out it. This caused the chat materials become more numerous, as the overseas ICQ system, the OICQ system that invented by Tencent Co., and so on. So we create a network chat medium just like the QQ.Java network programming based on the power, the use of Java designed to prepare graduates a chat system.In general, the majority of the chat tool for client and server program in addition to server-side storage of customer data for the database,the system uses a client / server architecture model the adoption of Java provided Socket class connect client and server and between the client and server communicate with each other, as the chat is to provide point-to-multipoint and multi-threaded Java function to be completed by using multi-threaded chat and more point-to-multipoint, database management system with SQL Server2000 the completion and adoption ofJDBC-ODBC Bridge access the database.The system built on the JAVA platform, the system design usingobject-oriented technology and object-oriented design principles. System uses the C / S structure, client and client-side and server-side client and send messages through Socket. The use of JAVA language, development tools using Eclipse. Design and Implementation of server-side process, the use of multi-threading technology, which can process in a single run at the same time a number of different threads, the implementation of different tasks. Procedures greatly enhanced the use of server resources.Chat system will allow people to complete chat to more friends,and the system can add, delete somebody,can deal with new user registration, send messages, receive messages and so on.Keywords : Multithreading ; Client/Server ;JA V A ;Socket ;Eclipse ;TCP/IP目录1 绪论 ......................................................................................................... 错误!未定义书签。
1.1国内外聊天系统的研究现状 (4)1.2J A V A语言 (6)1.2.1 Java的发展历史 ............................................................................... - 6 -1.2.2 Java的特点 ....................................................................................... - 6 -1.2.3 Java与Internet .................................................................................. - 7 - 1.3S OCKET编程 (7)1.3.1 关于TCP/IP协议............................................................................. - 7 -1.3.2 服务器和客户机.................................................. 错误!未定义书签。
1.4本文内容安排 (9)2 需求分析............................................................................................................................. - 9 - 2.1可行性研究 ................................................................ 错误!未定义书签。
2.1.1 可行性分析....................................................................................... - 9 -2.1.2系统功能需求.................................................................................. - 10 -2.1.3 系统性能需求................................................................................. - 10 -2.1.4 系统运行需求............................................................................... - 11 - 2.2数据流图 (11)2.2.1 顶层数据流图................................................................................. - 11 -2.2.2 一层数据流图............................................................................... - 11 -2.2.3 二层数据流图............................................................................... - 13 -3 概要设计........................................................................................................................... - 14 -3.1系统实现原理 (14)3.2系统实现层次图: (15)3.3各模块详细功能 (15)3.3.2服务器端结构.................................................................................. - 15 -3.3.2 客户端结构..................................................................................... - 16 -4 详细设计........................................................................................................................... - 17 -4.1系统流程图 (17)4.1.1 系统总体流程图............................................................................. - 17 -4.1.2 系统客户端流程图....................................................................... - 18 -4.2编写服务器端程序 (18)4.2.1 问题陈述......................................................................................... - 18 -4.2.2 解决方案....................................................................................... - 19 -4.3客户端程序编写 (23)4.3.3 聊天室............................................................................................. - 24 -参考文献 ............................................................................................................................... - 30 -致谢.............................................................................................................. 错误!未定义书签。