[Live-devel] How to redefine "FD_SETSIZE"

Warren Young warren at etr-usa.com
Mon Apr 14 13:17:37 PDT 2014


On 4/14/2014 08:24, Amir Marzouk wrote:
>
> I'm looking for how to increase the number of concurrent clients. I
> found in this link that i need to redefine "FD_SETSIZE". but I have not
> found how and where?

This is pretty basic stuff, a thing you should know as a programmer 
regardless of your use of Live555.

If you're using Makefiles:

     CFLAGS=$(CFLAGS) -DFD_SETSIZE=2048

That is, just append it to the value of CFLAGS or CXXFLAGS.

If you're using some other build system, you just need to find out where 
global #defines are normally set.

You can do this in a header, too:

     #define FD_SETSIZE 2048

...but you have to make certain it's #included before things like 
netinet/in.h, arpa/inet.h, winsock.h, etc.  Doing it at the build system 
level is more certain to override the platform default.


More information about the live-devel mailing list