/*
|
* =====================================================================================
|
*
|
* Filename: reqrep_center.h
|
*
|
* Description:
|
*
|
* Version: 1.0
|
* Created: 2021年04月01日 14时09分13秒
|
* Revision: none
|
* Compiler: gcc
|
*
|
* Author: Li Chao (),
|
* Organization:
|
*
|
* =====================================================================================
|
*/
|
#ifndef REQREP_CENTER_US3RBM60
|
#define REQREP_CENTER_US3RBM60
|
|
#include "center.h"
|
#include "defs.h"
|
#include "socket.h"
|
|
BHCenter::MsgHandler MakeReqRepCenter();
|
class ReqRepCenter
|
{
|
ShmSocket socket_;
|
|
public:
|
ReqRepCenter(ShmSocket::Shm &shm) :
|
socket_(shm, &BHTopicReqRepCenter(), 1000) {}
|
ReqRepCenter() :
|
ReqRepCenter(BHomeShm()) {}
|
~ReqRepCenter() { Stop(); }
|
bool Start(const int nworker = 2);
|
bool Stop() { return socket_.Stop(); }
|
};
|
|
#endif // end of include guard: REQREP_CENTER_US3RBM60
|