mirror of
https://github.com/commaai/msgq.git
synced 2026-06-13 00:14:32 +08:00
add conflate support in SubSocket constructor
This commit is contained in:
@@ -36,6 +36,13 @@ SubSocket * SubSocket::create(Context * context, std::string endpoint, std::stri
|
||||
return s;
|
||||
}
|
||||
|
||||
SubSocket * SubSocket::create(Context * context, std::string endpoint, std::string address, bool conflate){
|
||||
SubSocket *s = SubSocket::create();
|
||||
s->connect(context, endpoint, address, conflate);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
PubSocket * PubSocket::create(){
|
||||
PubSocket * s;
|
||||
if (std::getenv("ZMQ")){
|
||||
|
||||
@@ -30,6 +30,7 @@ public:
|
||||
static SubSocket * create();
|
||||
static SubSocket * create(Context * context, std::string endpoint);
|
||||
static SubSocket * create(Context * context, std::string endpoint, std::string address);
|
||||
static SubSocket * create(Context * context, std::string endpoint, std::string address, bool conflate);
|
||||
virtual ~SubSocket(){};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user