摘要
本文就网络聊天服务器程序和网络聊天客户程序两个方面展开论述。前者通过Socket套接字建立服务器,服务器能读取、转发客户端发来信息。后者通过与服务器建立连接,来进行客户端与客户端的信息交流。根据局域网通信机制的原理,通过直接继承Thread类来建立多线程。在网络编程中对信息的读取、发送,利用流来实现信息的交换,对实现一个系统的信息流进行分析。首先在短时间内建立系统应用原型,然后对初始原型系统进行不断修正和改进,直到形成实用系统。
Two aspects named sever chat program of the network and customer chat program of the network were dicussed in this paper.The former establishes the server through the Socket,the server can read and deliver the information which client sends.The latter makes a connection with the server,exchanges the information between the client and the client.According to the principle of the local area network communication mechanism,multi-threading were created by directly succession a Thread class.The information was read,send in the programming on the network,at the same time the information was exchanged by using the flow,the information flow was analysised on how to realized a system.At first,it can build a prototype system in a short period of time,and then init prototype of the system and improve constantly,until format of utility systems.
出处
《科技资讯》
2012年第2期45-49,共5页
Science & Technology Information