Hi all, I am trying to use zmq_msg_init_data in order to have the zero-copy advantage.
Now it is required, that I either pass a function, that can deallocate the data after zmq sent it, or I pass NULL in order to keep the ownership. In the latter case: How do I know that zmq has done his work and I can deallocate the data? Another idea was to pass a lambda function (with a capture) to zmq, in order to make zmq send a signal by calling the lambda function. The problem is, that it is not allowed to pass lambda functions with captures as function pointers and without captures, I have no clue how zmq could pass the signal. Maybe somebody of you now already have an idea? The general idea is: My robotic application keeps some sensor values for a while and sends some of the values to other robots via zmq. Therefore I don't want the data to be copied and I don't want zmq to deallocate it. I want my own application to deallocate it, if it is not needed anymore and zmq did send everything. Greetings, Stephan -- Distributed Systems Research Group Stephan Opfer T. +49 561 804-6280 F. +49 561 804-6277 Univ. Kassel, FB 16, Wilhelmshöher Allee 73, D-34121 Kassel WWW: http://www.uni-kassel.de/go/vs_stephan-opfer/ _______________________________________________ zeromq-dev mailing list zeromq-dev@lists.zeromq.org https://lists.zeromq.org/mailman/listinfo/zeromq-dev