[zeromq-dev] Getting remote_thr to work with short sequences

2010-12-02 Thread Steven McCoy
ØMQ still seems to follow 2.0 functionality for zmq_close on PUB sockets, such that in remote_thr the sockets get reaped by zmq_term instead of left to linger. Attached is an awful hack to ensure it attains at the time calculated by the provided rate limit. At least it makes sense even if it is

Re: [zeromq-dev] Question Regarding XREP

2010-12-02 Thread Praveen Baratam
Dear Dhammika and Chuck, I am trying to use an XREP socket as a PUB socket with publisher side filtering. In our case we dont need multiple subscriptions from a single sub-socket, so we are trying to use XREQ sockets as sinks and XREP socket as router as discussed in the guide - Advanced Stuff

Re: [zeromq-dev] behavior of zmq_term in 2.1.0

2010-12-02 Thread Martin Sustrik
Hi Chuck, After reading through Martin's responses, I think I see his dilemma. It appears the dilemma is that while zmq_term() might atomically set a flag indicating the socket is closed and begin deallocating its resources, a socket may be in the midst of doing some work that is already

Re: [zeromq-dev] Getting remote_thr to work with short sequences

2010-12-02 Thread Martin Sustrik
On 12/02/2010 09:05 AM, Steven McCoy wrote: ØMQ still seems to follow 2.0 functionality for zmq_close on PUB sockets, such that in remote_thr the sockets get reaped by zmq_term instead of left to linger. Attached is an awful hack to ensure it attains at the time calculated by the provided

Re: [zeromq-dev] Getting remote_thr to work with short sequences

2010-12-02 Thread Steven McCoy
On 2 December 2010 18:17, Martin Sustrik sust...@250bpm.com wrote: On 12/02/2010 09:05 AM, Steven McCoy wrote: ØMQ still seems to follow 2.0 functionality for zmq_close on PUB sockets, such that in remote_thr the sockets get reaped by zmq_term instead of left to linger. Attached is an

Re: [zeromq-dev] ZeroMQ (2.1.0 Git master) fails to build on CentOS 4

2010-12-02 Thread Chris Patti
On Wed, Dec 1, 2010 at 2:39 PM, Chris Patti cpa...@gmail.com wrote: Folks; I realize that I'm dealing with an edge case here, CentOS 4 is long in the tooth to say the least, but that's the environment we're stuck with for the moment at my work place. I get this identical error when building

Re: [zeromq-dev] Question Regarding XREP

2010-12-02 Thread Dhammika Pathirana
On Thu, Dec 2, 2010 at 1:22 AM, Praveen Baratam praveen.baratam+...@gmail.com wrote: Dear Dhammika and Chuck, I am trying to use an XREP socket as a PUB socket with publisher side filtering. In our case we dont need multiple subscriptions from a single sub-socket, so we are trying to use  XREQ

Re: [zeromq-dev] behavior of zmq_term in 2.1.0

2010-12-02 Thread Pieter Hintjens
Martin, If sockets are not in a critical section, can zmq_term not perform single-bit changes safely anyhow? -Pieter On 2 Dec 2010 10:55, Martin Sustrik sust...@250bpm.com wrote: Hi Chuck, After reading through Martin's responses, I think I see his dilemma. It appears the dilemma is that

Re: [zeromq-dev] IPC on Windows (again)

2010-12-02 Thread Martin Sustrik
On 11/30/2010 03:51 PM, Martin Lucina wrote: marcelo.can...@gmail.com said: 2010/10/28 Mikael Helbo Kjærm...@designtech.dk ... I could really use an IPC solution for Windows. ... I would love to see this too. I understand that the problems with implementing IPC on Windows are

[zeromq-dev] zmq_connect on SUB socket error errno 22

2010-12-02 Thread Jay Banyer
Gday, I'm new to 0MQ and my first attempt at using it is stuck. zmq_connect() for a SUB socket is failing with errno == 22. Code is here: http://pastebin.com/HctDf64J Compile with: g++ -l zmq -o zmq_test file.cpp Run publisher with: ./zmq_test pub tcp://127.0.0.1:8000 Seems to work. Run

Re: [zeromq-dev] zmq_connect on SUB socket error errno 22

2010-12-02 Thread Jay Banyer
On 3 December 2010 07:47, Mikko Koppanen mikko.koppa...@gmail.com wrote: $ ./Debug/zmq_test sub tcp://127.0.0.0.1:8000 Starting subscriber for tcp://127.0.0.0.1:8000 calling zmq_socket connecting to tcp://127.0.0.0.1:8000 zmq_connect error: (22) Invalid argument Hello, it seems that

Re: [zeromq-dev] zmq_connect on SUB socket error errno 22

2010-12-02 Thread Chuck Remes
On Dec 2, 2010, at 2:41 PM, Jay Banyer wrote: Gday, I'm new to 0MQ and my first attempt at using it is stuck. zmq_connect() for a SUB socket is failing with errno == 22. Code is here: http://pastebin.com/HctDf64J Compile with: g++ -l zmq -o zmq_test file.cpp Run publisher with:

Re: [zeromq-dev] zmq_connect on SUB socket error errno 22

2010-12-02 Thread Jay Banyer
On 3 December 2010 08:43, Martin Sustrik sust...@250bpm.com wrote: On 12/02/2010 10:30 PM, Chuck Remes wrote: zmq version: 2.0.6beta.dfsg-2 Aside from the typo, try running a later version like 2.0.10 or the recent 2.1.0 beta release. Yes. There used to be a bug in the past where IPv6

[zeromq-dev] Ada Translation of the Hello World server

2010-12-02 Thread Per Sandberg
My user name on git-hub is persan- /Regards /Per Sandberg --- -- Copyright (c) 2010 Per Sandberg -- --

Re: [zeromq-dev] Mac OS X: test_shutdown_stress sometimes fails

2010-12-02 Thread Dhammika Pathirana
Hi Martin, On Tue, Nov 23, 2010 at 5:49 AM, Martin Sustrik sust...@250bpm.com wrote: Dhammika, I donno, may be we should simplify this. Why don't we add a refcount? As a quick workaround -- yes. Do you have a patch for that kind of solution? However, thinking about it conceptually, the

Re: [zeromq-dev] behavior of zmq_term in 2.1.0

2010-12-02 Thread Pieter Hintjens
Why would it even wait? The socket can catch the eterm flag at any point, it is asynchronous between the two threads. - Pieter On 2 Dec 2010 20:50, Martin Sustrik sust...@250bpm.com wrote: Hi Pieter, If sockets are not in a critical section, can zmq_term not perform single-bit changes safely

Re: [zeromq-dev] behavior of zmq_term in 2.1.0

2010-12-02 Thread Martin Sustrik
Pieter, It has to flush the messages from that socket to guarantee that all messages sent before ETERM are actually pushed to the network. However, the socket has to be protected somehow, because if socket thread sends a message and term thread flushes the messages at the same time they are