On 18/03/12 18:36, Giuseppe Scrivano wrote: > Adam 'foo-script' Rakowski <[email protected]> writes: > >> You wrote about select(). Where it comes from? > manpages says 4.2BSD, the +1 thing let me feel it is correct. > > Giuseppe
See man 2 select, Adam. I think it was indeed added with BSD socket API. It's an ubiquous one, but usually the less efficient. In Linux you would get best results with epoll(2). Another alternative is poll(3p), BSD KQueue... There are libraries like libevent[1] which abstract the underlying socket multiplexing syscall. But it means adding a dependency to the package. gnulib seems to provide wrappers for select and poll. Take a look at the different options. Best regards 1- http://libevent.org/
