IPCBroker.h 573 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include "IPCChannel.h"
  3. namespace Atomic
  4. {
  5. class IPCProcess;
  6. /// Server application held broker
  7. class IPCBroker : public IPCChannel
  8. {
  9. friend class IPC;
  10. OBJECT(IPCBroker);
  11. public:
  12. /// Construct.
  13. IPCBroker(Context* context);
  14. /// Destruct.
  15. virtual ~IPCBroker();
  16. void ThreadFunction();
  17. bool Update();
  18. private:
  19. static unsigned idCounter_;
  20. bool SpawnWorker(const String& command, const Vector<String>& args, const String& initialDirectory = "");
  21. // broker instantiates the pipe pair
  22. PipePair pp_;
  23. };
  24. }