目 录
1 绪论..................................................................................................................................................................3
1.1 聊天软件开发背景 ...............................................................................................................................3
1.2 Java 语言 .............................................................................................................................................3
1.2.1 Java 的发展历史 .....................................................................................................................3
1.2.2 Java 的特点 .............................................................................................................................4
1.2.3 Java 与 Internet ....................................................................................................................5
1.3 Socket 编程 .........................................................................................................................................6
1.3.1 关于 TCP/IP 协议 ....................................................................................................................6
1.3.2 服务器和客户机 ......................................................................................................................6
2 需求分析..........................................................................................................................................................7
2.1 可行性分析 ...................................................................................................................................7
2.2 系统功能需求 ...............................................................................................................................7
2.3 系统性能需求 ..............................................................................................................................7
3 概要设计..........................................................................................................................................................8
3.1 运行环境 ...............................................................................................................................................8
3.2 软件功能框架图 ...................................................................................................................................8
3.2.1 服务端功能框架图 ...................................................................................................................8
3.2.2 客户端功能框架图 ...................................................................................................................8
4 详细设计..........................................................................................................................................................9
4.1 流程图...................................................................................................................................................9
4.1.1 服务端 .......................................................................................................................................9
4.1.2 客户端 .....................................................................................................................................10
4.2 编写服务器端程序 .............................................................................................................................10
4.2.1 通讯数据包说明(格式说明,包类型说明)......................................................................10
4.2.2 问题陈述 ................................................................................................................................11
4.2.3 解决方案 ..............................................................................................................................11
4.3 编写客户端程序 .................................................................................................................................13
4.3.1 通讯数据包说明(格式说明,包类型说明)......................................................................13
4.3.2 问题陈述 ................................................................................................................................13
4.3.3 解决方案 .................................................................................................................................13
5 系统实现.........................................................................................................................................................17
5.1 服务端.................................................................................................................................................17
5.1.1 服务器启动配置 .....................................................................................................................17
5.1.2 服务端主窗口 .........................................................................................................................17
5.2 客户端.................................................................................................................................................18
5.2.1 客户端登陆 .............................................................................................................................18
5.2.2 客户端配置 .............................................................................................................................19
5.2.3 客户端聊天主窗口 .................................................................................................................19
致谢....................................................................................................................................................................21
参考文献............................................................................................................................................................22