1、本科毕业设计 本 科 毕 业 设 计本 科 毕 业 设 计 题题 目目 一种网络棋牌游戏平台的设计与实现 学学 院院 计算机学院 专专 业业 软件工程 本科毕业设计 摘 要 本文设计讨论了 Socket 机制, 阐述了使用 Java 语言编写基于客户/服务器模式 的网络通讯程序方法。服务器的一个必需机能,就是能对多个客户的请求同时做 出响应。 利用 Java 的 Socket 机制和多线程机制进行多用户的 Client/Server 网络程 序设计。 Socket 是基于 TCP/IP 的网络上运行的两个程序间双向通讯的一种连接机 制 J 包中包含 Socket 类,用以快速地开发网络通信程序
2、。在 TCP/IP 协议体 系结构的基础上,分析了网络通信原理,结合 Socket 总结出网络通信编程的基本 模型,介绍 Java 的网络编程实现。主要是对 Socket 类和 Server Socket 类的调用。 Socket 类主要实现客户端套接字(也可以就叫“套接字”) 。套接字是两台机 器之间的通信端点。套接字的实际工作由 SocketImpl 类的实例执行。 Server Socket 类类实现服务器套接字。服务器套接字等待请求通过网络传入。 它基于该请求执行某些操作,然后可能向请求者返回结果。服务器套接字的实际 工作由 SocketImpl 类的实例执行。 通过对网络通信编程知识
3、的掌握和运用 Java 语言来实现一种简单的网络棋牌 室平台,主要包括一种游戏和聊天功能。 关键词:Java Socket;网络编程;套接字;流套接字 本科毕业设计 ABSTRACT This article discussed the socket mechanism, and elaborated how to write the java program based on the customer/server pattern. Socket is one of the two-way communications end between two procedures that are
4、operated on the network based on TCP/IP. J bag includes Scokets, which is used to develop the network communication procedure fast. One of the necessary functions of severs is to respond to multi-users simultaneously. The paper gives an introduction of the client/server network procedure design under the application of the Socket mechanism and Multi-thread mechanism it also gives an instance about it. On the basis of TCP/IP protocol system structure, this paper analyzes