[zeromq-dev] Delete czmq socket?

Pieter Hintjens ph at imatix.com
Mon Mar 17 15:46:48 CET 2014


You can delete sockets explicitly using zsocket_destroy(). That should
in theory really delete the socket.

On Mon, Mar 17, 2014 at 3:16 PM, Turkey Breast <turkeybreast at yahoo.com> wrote:
> How can I force to delete a czmq socket? I'm hitting max sockets creation
> limit.
>
> I have multiple threads returning data so I queue it using a push/pull
> inproc queue, which wakes up the main poller and then forwards it onto the
> main TCP socket. Each time a thread returns a result, I spawn a new socket,
> If this is not a good way to do things then I can replace this piece of code
> with a lockless_queue that I made:
>
> https://github.com/spesmilo/obelisk/blob/master/src/worker/worker.cpp#L26
>
> Or can I use the ZMQ API with zctx_t->context or is that not recommended?
>
> Should I not be using sockets for this sort of thing?
>
> Thanks
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



More information about the zeromq-dev mailing list