s=new Socket("202.195.208.71",80);
should be
s = new Socket("202.195.208.71", 4321);Of course "202..." is your ip address. But 4321 is your server's port number instead of 80. "80", the second parameter, is the maximun length of the queue.
should be
s = new Socket("202.195.208.71", 4321);Of course "202..." is your ip address. But 4321 is your server's port number instead of 80. "80", the second parameter, is the maximun length of the queue.
ServerSocket(port, backlog);服务器在4321端口监听
而客户端:s=new Socket("202.195.208.71",80);却试图连80端口,当然失败