📣 An issue occured with the embedded container registry on October 25 2021, between 10:30 and 12:10 (UTC+2). Any persisting issues should be reported to CC-IN2P3 Support. 🐛

Commit 7a83e599 authored by Pierre Aubert's avatar Pierre Aubert
Browse files

Use const binding of data_stream for size and message saving

parent ba89aede
Pipeline #98068 canceled with stages
in 6 minutes and 17 seconds
......@@ -39,10 +39,9 @@ class PZmqSocketManager{
* @param data : data to be sent
* @param flags : flags to be used to send the message (none, dontwait, sndmore, etc)
* @return true on success, false otherwise
* There is no way to use const U & data instead of U & data because of the genericness of data_size, based on data_stream (the cause is, the READ (i.e. from file to data) mode is not constant by definition)
template<typename U>
bool send(const T & name, U & data, zmq::send_flags flags = zmq::send_flags::none){
bool send(const T & name, const U & data, zmq::send_flags flags = zmq::send_flags::none){
size_t dataSize(data_size<U>(data));
zmq::message_t msg(dataSize);
char* iter = (char*)msg.data();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment