The ultimate socket library for C and C++, supporting TCP, UDP and Unix sockets (DGRAM and STREAM) on Linux, FreeBSD, Solaris. See also my uvco library for a refreshed version!
I ran into issues when using libsocket++ in an application that happened to have a large number of file descriptors open. I figured out that the issue was caused by the known limitation of select() and FD_SETSIZE (see "BUGS" section: http://man7.org/linux/man-pages/man2/select.2.html).
This eliminates problems with select() if the socket's file descriptor is greater than FD_SETSIZE (which is 1024 most of the time). The interface to selectset remains exactly the same so nothing should break.
This modification works very well in my testing so I figured that it may be useful to others as well.
I ran into issues when using libsocket++ in an application that happened to have a large number of file descriptors open. I figured out that the issue was caused by the known limitation of select() and FD_SETSIZE (see "BUGS" section: http://man7.org/linux/man-pages/man2/select.2.html).
This eliminates problems with select() if the socket's file descriptor is greater than FD_SETSIZE (which is 1024 most of the time). The interface to selectset remains exactly the same so nothing should break.
This modification works very well in my testing so I figured that it may be useful to others as well.