- 1、本文档共34页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
基于Socket的网络聊天系统开发与设计
摘 要
近年来随着计算机技术的飞速发展,特别是Internet技术的发展,已经深刻的改变到了人们生活的方方面面。这时过去的种种陈旧的通讯方式,都已经不能满足现代生活的需要。人们希望能够用更低廉的价格,更加方便快捷的方式,来实现即时通讯。这时开发一套基于Internet技术的网络聊天系统变得尤为重要。
本人以基于Java语言开发的网络聊天系统为实践基础,详细的介绍了聊天系统的功能设计和界面逻辑结构。最终实现了一个可以实现私聊、群聊、传送文件的网络聊天系统。本次设计主要以Socket网络通讯作为基础,并以Object作为通讯载体,同时运用了一定的通讯协议知识开发完成。在界面方面,采用的是Java中的Swing技术来实现。为了实现多用户的连接,在服务器端将采用多线程的技术来实现。
关键词:Java Socket 通讯协议 Swing 多线程
Socket-based web chat system development and design
Abstract
Recent years, with the rapid development of computer technology, especially Internet technology, has profound change to all aspects of peoples lives. At this time all the old past, means of communication, have been unable to meet the needs of modern life. People want to use more low cost, more convenient and efficient way to achieve real-time communications. Then develop a network based on Internet technology, chat system becomes particularly important.
I developed Java-based chat system based on practice, detailed description of the chat function of the system design and interface, logical structure. Ultimately can achieve a whisper, group chat, send files online chat system. This design mostly Socket network communication as the basis, and with Object as the communication carrier, while the use of a certain protocol to complete the knowledge development. In the interface, the use of the Java in the Swing technologies. To achieve multi-user connection, the server will use the technology to implement multithreading.
Keywords:Java Socket Communication protocol Swing Multithreading
目录
一.绪论 4
1.1 课题背景 4
1.2 课题研究内容及意义 4
1.3 系统相关技术介绍 5
1.3.1 Java语言概述 5
1.3.2 TCP/IP协议 7
1.3.3 Socket编程 9
1.3.4 Swing简介 11
1.3.5 多线程技术介绍 12
二.系统需求分析 15
2.1 需求分析 15
2.2 可行性分析 16
2.3.1 社会可行性 16
2.3.2 用户可行性 16
2.3.3 技术可行性 16
2.3.4 经济可行性 17
2.3 系统开发环境 17
三.系统总体设计 18
3.1 客户端与服务器的通信 18
3.2 客户端与客户端的通信 18
3.3 系统的架构模式 19
四. 系统功能模块设计 20
4.1 服务器端的设计 20
4.1.1 服务器等待连接线程设计 20
4.1.2 服务器处理客户端信息线程设计 21
4.2 客户端设计 27
4.2.1 客户端登录模块设计 27
4.2.2 新用
您可能关注的文档
最近下载
- TCCIAT0003-2019建筑施工承插型轮扣式模板支架安全技术规程.pdf
- T∕CTCA 6-2019 劳动防护手套.pdf
- 注册单元划分膝关节假体vlc g02.pdf VIP
- JTG5220—2020公路养护工程质量检验评定标准第一册土建工程全面解读.pptx
- 教育部留服务中心国(境)外学历学位认证评估程序和标准(试行)之附则.doc
- 土方工程课件.ppt
- 《医学细胞生物学》课件 第七章 细胞骨架与细胞运动.pptx
- 《排球正面双手垫球》教案排球正面双手垫球公开课教案1水.docx VIP
- 教育法学课件.ppt VIP
- 2023年人教版七年级语文下册期中试卷附参考答案 .pdf VIP
文档评论(0)