[zeromq-dev] Sharing socket safely between threads

2018-05-07 Thread Attila Magyari
Hello, I know that zmq sockets are not thread safe. However I can't think of a good design (explained below) without using the socket in several threads. What I want to do is connect the socket in a thread, and then use it in a different one until the end, and never in parallel between several

Re: [zeromq-dev] Sharing socket safely between threads

2018-05-12 Thread Attila Magyari
58 PM, Thomas Rodgers <rodg...@twrodgers.com> wrote: > > No, not really. I have designed my zmq based systems to either - > * orchestrate connections over the inproc transport > * performed the delicate dance of explicitly passing a fresh socket to a > fresh thread the way t

Re: [zeromq-dev] Sharing socket safely between threads

2018-05-07 Thread Attila Magyari
you can guarantee there is > no racy usage from another thread, you can issue a memory fence using - > > std::atomic_thread_fence > > On Mon, May 7, 2018 at 8:42 AM Attila Magyari <att...@gmail.com> wrote: > >> Hello, >> >> I know that zmq sockets are not thread safe

Re: [zeromq-dev] cppzmq - how to use ::monitor_t properly?

2018-05-25 Thread Attila Magyari
e best one, specially if you need > to monitor several sockets... > > HTH, > Francesco > > > 2018-05-25 9:09 GMT+02:00 Attila Magyari <att...@gmail.com>: > >> Hello, >> >> How do you use the cppzmq's zmq::monitor_t::monitor() call correctly? It &

[zeromq-dev] cppzmq - how to use ::monitor_t properly?

2018-05-25 Thread Attila Magyari
Hello, How do you use the cppzmq's zmq::monitor_t::monitor() call correctly? It is an infinitely blocking method, and I don't know how to exit from it gracefully. Is the use of socket monitoring discouraged? Are there better alternatives to get connection status of the socket? Thank you!

Re: [zeromq-dev] ZMQ_PAIR over TCP

2018-06-18 Thread Attila Magyari
As I understood, the documents are outdated, and ZMQ_PAIR is supposed to work not only for inproc protocols. I am definitely not sure about this, and I as well use it for TCP, so would be interested in the answers. On Mon, Jun 18, 2018 at 12:40 PM James Harvey wrote: > Hi, > > > > I have been

Re: [zeromq-dev] ZMQ_PAIR over TCP

2018-06-18 Thread Attila Magyari
t;> > As I understand from the above quote; Thanks to these characteristics PAIR > socket is more suitable for inproc environment where threads are statics > however you can use PAIR sockets over TCP as long as you aware and accept > the behavior of PAIR which does not reconnect. &

[zeromq-dev] Installing PyZMQ with draft sockets

2018-10-25 Thread Attila Magyari
Hello, Does anyone have experience building PyZMQ on Windows with draft sockets enabled? I tried following the steps from here: pyzmq.readthedocs.io/en/latest/draft.html but I'm having errors I can't overcome: For building pyzmq, I tried using using the bundled libzmq, which has library

Re: [zeromq-dev] Help using VSCode to build libzmq

2018-11-02 Thread Attila Magyari
To build libzmq you need to have a compiler. VSCode is not a compiler, so by default it doesn't build anything. You can install extensions for C++, which let you build code, but it requires some setting up. For building libzmq, you have several options, you can check them out in the builds

[zeromq-dev] Installing PyZMQ with draft sockets

2018-11-27 Thread Attila Magyari
Hello, Does anyone have experience building PyZMQ on Windows with draft sockets enabled? I tried the following the steps from here: pyzmq .readthedocs.io/en/latest/draft.html but I'm having errors I can't overcome: For building pyzmq, I tried using using the bundled libzmq, which has library

[zeromq-dev] Which socket to choose?

2019-08-19 Thread Attila Magyari
Hello, Currently I am using ZMQ_PAIR for interprocess communications over TCP. As the docs say, this should not work correctly as I use it, hence I am getting some undesired behavior from time to time. I would like to use a different socket, and the CLIENT/SERVER ones would be absolutely

Re: [zeromq-dev] Which socket to choose?

2019-08-19 Thread Attila Magyari
as in one server socket to handle multiple client connections, just like the CLIENT/SERVER sockets. Regards, Attila On Mon, Aug 19, 2019 at 7:22 PM Brett Viren wrote: > Attila Magyari writes: > > > Reading the docs all the other sockets seem to have extra restrictions or > > complica

Re: [zeromq-dev] Which socket to choose?

2019-08-24 Thread Attila Magyari
> From: zeromq-dev On Behalf Of Brett > Viren via zeromq-dev > Sent: Tuesday, August 20, 2019 7:37 AM > To: Attila Magyari > Cc: Brett Viren; ZeroMQ development list > Subject: Re: [zeromq-dev] Which socket to choose? > > > [EXTERNAL EMAIL] > > Hi again, Attil

[zeromq-dev] Static zmq context in Windows DLL

2019-12-09 Thread Attila Magyari
Hello, I've encountered this issue: https://github.com/zeromq/czmq/issues/1788 Basically when exiting the application, I get this error: *Assertion failed: Successful WSASTARTUP not yet performed.* I am using ZeroMQ on windows inside a DLL. I have a global static zeromq context, because I want