select() max sockets

前端 未结 4 1824
感动是毒
感动是毒 2021-01-13 10:43

Just more asynchronous stuff!

Alright, so I now have a working asynchronous socket program for my main chatting application, and it\'s working really well! However I

4条回答
  •  长情又很酷
    2021-01-13 11:11

    Yes, the FD_SETSIZE has a limit of 1024. You can easily check that by looking at the select.h header. People have tried to increase the limit, but the reports vary from "working" to "crashing" after a while. If you need that many connections, use poll instead.

    A very good article to read.

提交回复
热议问题