diff options
author | 2016-08-03 12:01:51 +0300 | |
---|---|---|
committer | 2016-08-03 15:03:09 +0300 | |
commit | 35ab1e1766baedee576d282c928ac37b42f66e8d (patch) | |
tree | 182f311e6822a7ccf1f8497825ad275643604394 /src/publisher/trex_publisher.h | |
parent | bcc2ca1a462ac65dec74e65c81e633e4f30d7fc1 (diff) |
async compressed - https://trex-tgn.cisco.com/youtrack/issue/trex-232
Diffstat (limited to 'src/publisher/trex_publisher.h')
-rw-r--r-- | src/publisher/trex_publisher.h | 7 |
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__ */ |