IM icon indicating copy to clipboard operation
IM copied to clipboard

CilentActivity 数量大于5就不通讯了

Open wangwww2017 opened this issue 7 years ago • 0 comments

CilentActivity 数量大于5就不通讯了,请问是什么问题 这里 public class ServerListen { private final int PORT = 8399; private ServerSocket server; private static int Number = 0; public static void main(String args[]){ new ServerListen().begin(); } public void begin(){ try { server = new ServerSocket(PORT); System.out.println("服务器已经启动..."); } catch (IOException e) { System.out.println("服务器启动失败"); e.printStackTrace(); } **while(true){ try { Socket client = server.accept();

			new ClientActivity(this,client);
			System.out.println("ClientActivity Num : " + Number++);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}**
}

wangwww2017 avatar Jan 02 '18 07:01 wangwww2017