The network communication in Java is completed by the Socket's.The Socket communicative mechanism,programming steps and methods are displayed in this paper.A two-way communication is established between the client and the server through Socket——chat system,data can be exchanged through the system.Customers can easily communicate with the server network or to other customers in this system.%Java中的网络通信都是通过Socket完成的.主要阐述了Socket的通信机制、编程的步骤和方法,利用Socket套接字在客户端与服务器之间建立一个双向的通信连接,实现了一个网络通信——聊天系统.通过所建立的聊天系统,客户可轻易地同服务器进行网络通信,也可通过服务器同其他客户进行通信.
展开▼