摘要: 以网络棋牌类游戏系统为实现背景,指出目前winsock 通信方式的缺陷,提出在非阻塞式通信方式的基础上创建多线程的网络通信机制并详细介绍其中的关键技术,同时给出了Java 实现的服务器端和客户端的核心代码框架,可方便地应用到类似系统,具有一定的通用性和可重用性。
关键词:
非阻塞式winsock;多线程;Java;网络通信
Abstract: In the internet chess and card game, some defects based on winsock mechanism are pointed out. A Java coding framework is put forward and analyzed, which is based on mechanism united friendliness of multi-threads technology in non-blocking. Finally, a solution is given for the general application.
Key words:
Non-blocking winsock; Multi-threads; Java; Network communication
戴大蒙. 基于非阻塞式 Winsock 的多线程网络通信机制[J]. 计算机工程, 2006, 32(6): 137-138,142.
DAI Dameng. Multi-threads Communication Mechanism Based on Non-blocking I/O Winsock[J]. Computer Engineering, 2006, 32(6): 137-138,142.