Java聊天室毕业论文 联系客服

发布时间 : 星期四 文章Java聊天室毕业论文更新完毕开始阅读89049ae59b89680203d8259a

河南理工大学本科生毕业设计(论文)说明书

摘 要

JAVA语言是目前Internet上大型的WEB应用程序开发时使用得最热门的编程语言,本文描述了JAVA技术的特点以及在互联网上的使用情况,介绍这种技术的重要编程方法,并以JAVA开发技术为核心的网上聊天系统。

本系统利用Java实现基于C/S模式的聊天程序。聊天室共分为服务器端和客户端两部分,服务器端程序主要负责侦听客户端发来的消息,客户端需登录到服务端才可以实现正常的聊天功能。服务器端的主要实现:在特定端口上进行侦听,等待客户端连接;用户可以配置服务端的侦听端口,默认端口为8888;向已经连接到服务端的用户发送系统消息;统计在线人数;当停止服务时,断开所有的用户连接。客户端的主要功能为:连接到已经开启服务的服务端;用户可以配置要连接服务器端的IP地址与端口号;用户可以配置连接后显示的用户名;当服务器端开启的话,用户可以随时登录与注销;用户可以向所有人或某一个人发送消息。从而客户与客户之间以及客户与服务器之间可以简单方便地进行通信。

主要使用Sun公司提供Java语言、jdk开发环境及套接字通信socket技术,完成了对服务器端和客户端之间相互交流功能的实现。 关键词:JAVA, SOCKET, JAVA聊天室

I

河南理工大学本科生毕业设计(论文)说明书

Abstract

The JAVA language is on present Internet when the large-scale WEB application procedure development used the most popular programming language, this article described the JAVA technology characteristic as well as on Internet's service condition, introduced that this kind of technical the important programming method, and on-line chatted the system take the JAVA development technology as the core.

This system realizes using Java based on the C/S pattern chats the procedure. The chatroom altogether divides into the server end and the client side two parts, the news which the server end procedure primary cognizance interception client side sends, the client side must register the service end only then to be possible to realize normally chats the function. The server end main realizes: Carries on the interception on the specific port, the waiting client side connection; The user may dispose the service end the interception port, tacitly approves the port is 8888; To already connected the service end the user transmitting system news; Counts the online population; When the stop serves, separates all user connection. The client side major function is: Connected already opened the service the service end; The user may dispose must connect the server end the IP address and the port number; After the user may dispose the connection, demonstrated user; When the server end opening words, the user may momentarily register with logging out; The user may to all people or someone sending a message. Thus between the customer and the customer as well as the customer and the server may carry on the correspondence conveniently simply.

Mainly uses Sun Corporation to provide the Java language, the jdk development environment and the sleeve joint character corresponds the

II

河南理工大学本科生毕业设计(论文)说明书

socket technology, has completed exchanges function realization mutually to between the server end and the client side.

keywords: JAVA, SOCKET, JAVA chatroom

III

河南理工大学本科生毕业设计(论文)说明书

目 录

1 前言 ..................................................... 1 2 概论 ..................................................... 2 2.1 JAVA的网络功能与编程 ................................. 2 2.1.1 JAVA概述 ........................................... 2 2.1.2 JAVA的特点 ......................................... 3 2.1.3 JAVA语言在网络上的应用 ............................. 6 2.2 数据报通信常识 ........................................ 7 2.3 URL与URLCONNECTION ..................................... 8 2.4 套接字通信 ............................................ 9 3 规划设计 ................................................ 13 3.1 课题来源 ............................................. 13 3.2 需求分析 ............................................. 13 4 系统分析与设计方案 ...................................... 15 4.1 聊天系统的总体设计要点 ............................... 15 4.2 聊天系统的设计步骤 ................................... 15 4.3 聊天系统各功能模块 ................................... 16 5 系统设计环境与测试 ...................................... 43 5.1 开发环境工具 ......................................... 43 5.2 硬件环境 ............................................. 44 5.3 网站功能模块的测试 ................................... 44 6 总结 .................................................... 52 6.1 毕业设计总结和展望 ................................... 52 6.2 经验和感想 ........................................... 52

IV