我在看下面这个函数的注释时看到
long listen(long sd, long backlog)
backlog在这个版本未实现,是不是指只能连接一个客户端,那么有没有方法实现多个客户端相连呢,比如
建立数组,建立多个socket,但是我这样做不行呀
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.
可以多个连接和多个socket的,这主要看accept是怎么调用的。你不要让recv block, 然后accept也要一直被调度到。