summaryrefslogtreecommitdiffstats
path: root/src/publisher/trex_publisher.h
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-08-03 16:21:12 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-08-03 16:21:12 +0300
commit0f863b48e742ecd6b6dd522803e95a528024bbc9 (patch)
tree81798d3fb9d40ee41efbb41d69170c752a5c3a5f /src/publisher/trex_publisher.h
parent3159743120d9e1033c5ed809c1031b814204fd8f (diff)
parent0ccbb8ff779d4e905fc4fea5d2570f6e72821b0e (diff)
Merge remote-tracking branch 'origin/master'
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__ */