(The network communication in Java all ends through Socket. Firstly, the communication mechanism, programming process and method of Socket are discussed. A two-way communication connection is built between client and server by using Socket socket, and a network communication-chat system is realized.)