Dear Sir:

I found a workaround to solve this problem:
Just reset the readSet before select():

void BasicTaskScheduler::SingleStep(unsigned maxDelayTime) {
.....
  {
        HandlerIterator iter(*fReadHandlers);
        HandlerDescriptor* handler;
        FD_ZERO(&readSet);
        while ((handler = iter.next()) != NULL) {
            FD_SET((unsigned)handler->socketNum, &readSet);
        }
   }
  int selectResult = select(fMaxNumSockets, &readSet, NULL, NULL,
&tv_timeToDelay);
...
}

It is strange since each fd in readSet can be selected individually and the
fds seem the same as in fReadSet.
So I force readSet to be reset for each socket number in handlers and it
works finally.

BR.
Brain Lai
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to