Hi,
I'm wondering how to handle lvzmq_proxy function when you want to stop it? Closing the socket causes an error, but I know of no other way to terminate it.
Regards,
Blaz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Blaz,
The correct way is to terminate the context that owns the proxy using zmq_ctx_destroy. This will then cause the proxy function to return immediately. Typically you would only want to stop the proxy at exit, in which case having to close all sockets in the context is fine, or you would create a context specifically for the proxy so that it can be terminated as required.
Cheers,
Martijn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm wondering how to handle lvzmq_proxy function when you want to stop it? Closing the socket causes an error, but I know of no other way to terminate it.
Regards,
Blaz
Hi Blaz,
The correct way is to terminate the context that owns the proxy using zmq_ctx_destroy. This will then cause the proxy function to return immediately. Typically you would only want to stop the proxy at exit, in which case having to close all sockets in the context is fine, or you would create a context specifically for the proxy so that it can be terminated as required.
Cheers,
Martijn