Thanks a lot for your help Martin. This solved my issue.

For those interested, I now have a Client/Service setup based on service
names (multicast DNS) so that there is no need for IP or port. The services
automatically connect/reconnect. All the networking is async so that the
client never waits on the service (send returns false if the service is
offline). Usage (Lua code):

==== Client code
client = lk.Client(function(data)
  -- do something with data from subscriptions
end)

client:subscribe('Superman news')

-- if you need to send something to a service, you can just do:
client:send('Catwoman', 'Superman is not at home')

==== Service (server) code
saturn = rk.Service('Superman news', function(data)
  -- do something with the received data
  -- notify
  return data
end)

-- push content
saturn:notify("I'm not at home")
====

That's it.

Thanks a lot to you guys for your patience with my weird bugs.

Cheers,

Gaspard

On Tue, Feb 8, 2011 at 11:51 AM, Martin Sustrik <[email protected]> wrote:

> Hi Gaspard,
>
>
>   From my guess, the "zombie" won't let go and keeps haunting the
>> application because it has some unsent messages in its queue (PUSH
>> socket).
>>
>
> Use ZMQ_LINGER option to specify the time sockets try to send the pending
> messages after they are closed. By setting it to 0, the socket will exit
> immediately on zmq_close().
>
> Martin
>
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to