Skip to content

CilentActivity 数量大于5就不通讯了 #2

@wangwww2017

Description

@wangwww2017

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();
		}
	}**
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions