ServerFinder::ServerFinder ()
: _disabled (false)
- , _broadcast_thread (0)
+ , _search_thread (0)
, _listen_thread (0)
, _stop (false)
{
- _broadcast_thread = new boost::thread (boost::bind (&ServerFinder::broadcast_thread, this));
+ _search_thread = new boost::thread (boost::bind (&ServerFinder::search_thread, this));
_listen_thread = new boost::thread (boost::bind (&ServerFinder::listen_thread, this));
Config::instance()->Changed.connect (boost::bind (&ServerFinder::config_changed, this, _1));
}
{
_stop = true;
- _broadcast_thread->interrupt ();
- _broadcast_thread->join ();
+ _search_thread->interrupt ();
+ _search_thread->join ();
_listen_io_service.stop ();
_listen_thread->join ();
}
void
-ServerFinder::broadcast_thread ()
+ServerFinder::search_thread ()
try
{
boost::system::error_code error;
ServerFinder ();
~ServerFinder ();
- void broadcast_thread ();
+ void search_thread ();
void listen_thread ();
bool server_found (std::string) const;
bool _disabled;
- /** Thread to periodically issue broadcasts to find encoding servers */
- boost::thread* _broadcast_thread;
+ /** Thread to periodically issue broadcasts and requests to find encoding servers */
+ boost::thread* _search_thread;
/** Thread to listen to the responses from servers */
boost::thread* _listen_thread;