summaryrefslogtreecommitdiffstats
path: root/src/publisher/trex_publisher.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/publisher/trex_publisher.h')
-rw-r--r--src/publisher/trex_publisher.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/publisher/trex_publisher.h b/src/publisher/trex_publisher.h
index 1d283478..fb7226c4 100644
--- a/src/publisher/trex_publisher.h
+++ b/src/publisher/trex_publisher.h
@@ -38,7 +38,7 @@ public:
virtual bool Create(uint16_t port, bool disable);
virtual void Delete();
- virtual void publish_json(const std::string &s);
+ virtual void publish_json(const std::string &s, uint32_t zip_threshold = MSG_COMPRESS_THRESHOLD);
enum event_type_e {
EVENT_PORT_STARTED = 0,
@@ -71,9 +71,14 @@ public:
private:
void show_zmq_last_error(const std::string &err);
+ void publish_zipped_json(const std::string &s);
+ void publish_raw_json(const std::string &s);
+
private:
void * m_context;
void * m_publisher;
+
+ static const int MSG_COMPRESS_THRESHOLD = 256;
};
#endif /* __TREX_PUBLISHER_H__ */