Hi,
As part of his review, fche suggested an alternate threading algorithm
for service discovery via active probing. His algorithm utilizes a pool
of threads contending for the next available address+port and attempting
connections until no more address+port combinations remain. The
algorithm simplified several aspects of the implementation, including
eliminating the need to count processed addresses, more robust cleanup
and making it easier to handle more than one port for a given service.
He mentioned abandoning the retry when a socked cannot be created due to
EAGAIN, suggesting that TCP should be able to handle this. I left this
in because it would be difficult to try again with another thread, since
the algorithm would already have advanced past the address+port
combination in question.
Pushed to the brolley/dev branch of pcpfans.
Dave
--------------------------------------------------------
commit c8e9b3dc926d0285db06d94207ec36f29f8e3678
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date: Tue Jun 3 12:01:54 2014 -0400
Implement fche's threading algorithm for active probing.
|