|
|
|
|
|
by jrmenon
4499 days ago
|
|
Big fan of kqueue() mentioned in the article. IIRC with sockets, it not only tells you if the socket fd is ready (say for non-blocking read), but even informs the number of bytes available to read which allows you write efficient code (i.e. not to some fixed buffer where you may need to loop in again to see if more data needs to be read). Also I think for files/directories, you can listen for any changes that occur. Wish this was officially available in Linux. |
|