關於select中fd限制問題

select 是多路複用,或異步模型中常常用到的一個系統調用。 linux 基本原型爲: 數組 int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); 網絡 該函數的一個缺點就是nfds不能太大。上限爲1024.爲何會有這樣的限制,今天就來一塊兒看看se
相關文章
相關標籤/搜索