On Sun, 2017-06-25 at 14:26 +0300, Mos Yud wrote:
> Hi,
>
> 2 questions:
>
> 1. I have one client and no server (no server is running). I also
> have the
> following code:
>
> * zmq::context_t context(1);*
>
> * zmq::socket_t * client = s_client_socket(context);*
>
> * // set receive timeout*
> * int timeout = 10;*
> * int res = zmq_setsockopt(client, ZMQ_RCVTIMEO, &timeout,
> sizeof(int));*
>
>
> s_client_socket(...) looks like this:
>
> static zmq::socket_t * s_client_socket(zmq::context_t & context) {
> zmq::socket_t * client = new zmq::socket_t(context, ZMQ_REQ);
> client->connect("tcp://localhost:5555");
>
> // Configure socket to not wait at close time
> int linger = 0;
> client->setsockopt(ZMQ_LINGER, &linger, sizeof(linger));
>
> return client;
> }
>
> After this code is activated, client is connected (even-though there
> is no
> server listening).
> Then i invoke socket.send(...) and the socket.recv(...), and i get
> that
> the recv is blocked and doesn't return after the timeout i set above.
> Any suggestion for this issue?It works fine with just libzmq, so maybe try without the C++ bindings > 2. Does ZMQ support named pipes for windows? I only found sockets, so > please correct if i am wrong here. It does not. Kind regards, Luca Boccassi
signature.asc
Description: This is a digitally signed message part
_______________________________________________ zeromq-dev mailing list [email protected] https://lists.zeromq.org/mailman/listinfo/zeromq-dev
