This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

如何实现tcp服务多连接



我在看下面这个函数的注释时看到

long listen(long sd, long backlog)

backlog在这个版本未实现,是不是指只能连接一个客户端,那么有没有方法实现多个客户端相连呢,比如

建立数组,建立多个socket,但是我这样做不行呀