一、首先进行Server的编写: public class SocketServer { private static Socket mSocket; public static void main(String[] argc) { try { //1.创建一个服务器端Socket,即ServerSocket,指定绑定的端口,并监听此端口 ServerSocket serverSocket = new ServerSocket(12345); InetAddress address = InetAddress.getLocalHost(); String i