Socket client1;
try {
client1 = new Socket("localhost",9999);//连接到本地的9999端口
System.out.println("已与服务器连接");
}catch(Exception ee){
System.out.println("无法连接服务器请检查网络");
System.exit(0);
}