[Live-devel] Problem using live555MediaServer with more than 250 clients

Ross Finlayson finlayson at live555.com
Wed Dec 10 12:27:04 PST 2014


> socket() can give a number above FD_SETSIZE (FD_SETSIZE is a limit for fd_set used by select(), but is not related to socket()).

Yes, you’re right; my mistake.

Yes, I suppose I could add a test for “socketNum >= FD_SETSIZE” to “BasicTaskScheduler::setBackgroundHandling()” (note that there’s already a test for “socketNum < 0”).  I would have thought/hoped that FD_SET() would have already tested for this, but perhaps not...

This is all assuming that it’s better to have the code just silently fail to handle events on any sockets with number > FD_SETSIZE, than to fail with an “internalError()” call in this case (due to “select()” having returned <0).  (Note, BTW, that you can - if you wish - subclass “(Basic)UsageEnvironment” and redefine the “internalError()” virtual function to do whatever you want.)

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20141211/df3e26c8/attachment.html>


More information about the live-devel mailing list