I am testing the examples of the [ZeroMQ framework](http://zguide.zeromq.org/page:all) asynchronous library messaging to work in distributed applications, enabling the interoperability between programming languages.

My interest is that from a client application in C++ I can send a message and this is received in server application in python.

In order to this objective, I am using the following samples:

The client application in C++ is named `hwclient.cpp` and [is based in this code:](http://zguide.zeromq.org/cpp:hwclient)

```
#include <zmq.hpp>
#include <string>
#include <iostream>

int main ()
{
    //  Prepare our context and socket
    zmq::context_t context (1);
    zmq::socket_t socket (context, ZMQ_REQ);

    std::cout << "Connecting to hello world server…" << std::endl;
    socket.connect ("tcp://localhost:5555");

    //  Do 10 requests, waiting each time for a response
    for (int request_nbr = 0; request_nbr != 10; request_nbr++) {
        zmq::message_t request (5);
        memcpy (request.data (), "Boti", 5);
        std::cout << "Sending " << request_nbr << "…" << std::endl;
        socket.send (request);

        //  Get the reply.
        zmq::message_t reply;
        socket.recv (&reply);

        // Print the reply, memory address ...
        std::cout << 'Mostrando reply' << &reply << std::endl;

        std::cout << "Received from server " << request_nbr << std::endl; reply;
    }
    return 0;
}

```

The python server is named `hwserver.py` and [is based in this code](http://zguide.zeromq.org/py:hwserver):

```
import time
import zmq

context = zmq.Context()
socket = context.socket(zmq.REP)
socket.bind("tcp://*:5555")

while True:
    #  Wait for next request from client
    message = socket.recv()
    print("Received request: %s" % message)

    print('hi')

    #  Do some 'work'
    time.sleep(1)

    #  Send reply back to client
    socket.send(b"World")
    print('Response sent')

```

I build the C++ client with `g++ hwclient.cpp -o client.out -lzmq` and execute the binary to send a message from client of this way:

```
bgarcial@elpug : ~/CLionProjects/ZeroMQ
[0] % ./client.out
Connecting to hello world server…
Sending 0…
17018666170x7ffcbea254d0
Received from server 0
Sending 1…
17018666170x7ffcbea254d0
Received from server 1
Sending 2…
17018666170x7ffcbea254d0
Received from server 2

bgarcial@elpug : ~/CLionProjects/ZeroMQ
[0] % 

```

In the server side, the `Boti` string has been arrived! 

```
[127] % python HelloWorldServer/zeromq_server.py
Received request: b'Boti\x00'
hi
Response sent
Received request: b'Boti\x00'
hi
Response sent
Received request: b'Boti\x00'
hi
Response sent

```

But I think that the code section `socket.send(b"World")` in the server is not executed because in my client does not arrive the `World` string ... 

Is it possible that I am not receiving the reply in my c++ client of a suited way?

When I test the python server with a python client server, the reply from server arrives at client in a successful way ...

Why I cannot see the reply from server in my c++ application client?