IPCWorker.h 587 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include "IPCTypes.h"
  3. #include "IPC.h"
  4. #include "IPCChannel.h"
  5. namespace Atomic
  6. {
  7. class IPCWorker : public IPCChannel
  8. {
  9. OBJECT(IPCWorker);
  10. public:
  11. /// POSIX Constructor
  12. IPCWorker(Context* context, IPCHandle fd, unsigned id);
  13. // Windows Constructor, two named pipes are used
  14. IPCWorker(Context* context, IPCHandle clientRead, IPCHandle clientWrite, unsigned id);
  15. /// Destruct.
  16. virtual ~IPCWorker();
  17. void ThreadFunction();
  18. bool Update();
  19. private:
  20. // on unix will be the same
  21. IPCHandle clientRead_;
  22. IPCHandle clientWrite_;
  23. };
  24. }