| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #include "../IO/Log.h"
- #include "IPCWorker.h"
- #include "IPCMessage.h"
- #include "IPCUnix.h"
- namespace Atomic
- {
- IPCWorker::IPCWorker(int fd, Context* context) : IPCChannel(context),
- fd_(fd)
- {
- if (!transport_.OpenClient(fd_))
- {
- LOGERRORF("Unable to open IPC transport fd = %i", fd_);
- shouldRun_ = false;
- return;
- }
- LOGERRORF("Opened IPC transport fd = %i", fd_);
- }
- IPCWorker::~IPCWorker()
- {
- }
- void IPCWorker::ThreadFunction()
- {
- while(shouldRun_)
- {
- if (!Receive())
- {
- Stop();
- break;
- }
- }
- }
- }
|