#ifndef __NewConnections_h_ #define __NewConnections_h_ #include "SocketInfo.h" #include "PipeConditionVar.h" #include "ThreadClass.h" class NewConnections : private ThreadClass { private: PipeConditionVar _timeToShutDown; NewSocketListener * const _listener; int _mainSocket; const bool _showInLog; bool _success; static void updateMultiCastInfo(int port); protected: void threadFunction(); public: NewConnections(NewSocketListener *listener, int port, bool showInLog=true); // True if we were able to start listening. bool getSuccess() { return _success; } // Stops listening for new connections very quickly. Returns only // after the listening thread is shutdown. ~NewConnections(); }; #endif