ZmqException if $(ZMQ) reports an error.
$(ZMQREF zmq_recv()) (with the ZMQ_DONTWAIT flag, in the case of tryReceive).
// Sender auto snd = Socket(SocketType.req); snd.connect("ipc://zmqd_receive_example"); snd.send("Hello World!"); // Receiver import std.string: representation; auto rcv = Socket(SocketType.rep); rcv.bind("ipc://zmqd_receive_example"); char[256] buf; immutable len = rcv.receive(buf.representation); assert (buf[0 .. len] == "Hello World!");
Receives a message part.
_receive blocks until the request can be satisfied. tryReceive performs the operation in non-blocking mode, and returns a bool value that signifies whether a message was received.