[zeromq-dev] First try - Java client, CPP server

Ian Barber ian.barber at gmail.com
Wed Feb 13 20:41:43 CET 2013

On Mon, Feb 11, 2013 at 6:40 AM, Deepak Jharodia
<deepakjharodia at gmail.com>wrote:

> Hi,
> I'm starting with ZMQ and created my first program. The client is in Java
> and server in CPP, using respective bindings. I have three questions:
> 1) I want client to connect only if server is running(on that IP). Right
> now, client connects even if I give a random IP.

By design - take a look at the guide: http://zguide.zeromq.org

> 2) I want to start server and *then* start client and send requests.
> However, if I do this nothing happens. But if I start client first and send
> a request and then start server, it receives a packet.

You're using REQ to REQ, which is not a useful combination. Again, refer to
the guide: http://zguide.zeromq.org (or the man pages)

> 3) The way I’m trying to extract message, I get first character of message
> correct. Rest is all garbage. Am I doing something wrong?

I'm actually surprised you can recv at all as the first call on a REQ -
that should generate an EFSM, so I'll take a look at that as a potential

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130213/3b68e4de/attachment.html>

More information about the zeromq-dev mailing list