且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

连接到服务器的套接字客户端数

更新时间:2022-06-26 22:49:10

我想不出什么办法,您只需要拥有一个名为count的变量,并每次对其进行递增.

There is no way that I can think of, you would just have to have a variable called count and increment it each and every time.

int count = 0;
server.accept(); 
count++;