12 #ifndef ROOT_TMPWorker
13 #define ROOT_TMPWorker
31 virtual void Init(
int fd,
unsigned workerN);
41 std::unique_ptr<TSocket>
fS;
virtual void HandleInput(MPCodeBufPair &msg)
Handle a message with an EMPCode.
pid_t fPid
the PID of the process in which this worker is running
unsigned fNWorker
the ordinal number of this worker (0 to nWorkers-1)
This class works in conjuction with TMPClient, reacting to messages received from it as specified by ...
#define ClassDef(name, id)
unsigned GetNWorker() const
std::unique_ptr< TSocket > fS
This worker's socket. The unique_ptr makes sure resources are released.
TMPWorker()
Class constructor.
TMPWorker & operator=(const TMPWorker &)=delete
std::pair< unsigned, std::unique_ptr< TBufferFile >> MPCodeBufPair
An std::pair that wraps the code and optional object contained in a message.
virtual void Init(int fd, unsigned workerN)
This method is called by children processes right after forking.