i trying implement inter-process communication.
the model: part a -> sends messages part b.
i have implemented using client-server example zmq
tutorial (code attached bellow), facing issues process "locked".
what best practice implement kind of model?
it not classic "client-server". 1 part sends data second part, , second part uses it.
is there option send message timeout, not lock process?
any input / example appreciated!
server:
zmq::context_t context(1); zmq::socket_t socket(context, zmq_rep); socket.bind("tcp://*:5555"); .. socket.recv(&request); // server.receives first socket.send(reply); // server.sends next client .. // .analyze .recv'd data
client:
requester = context.socket(zmq.req); requester.connect("tcp://localhost:5555"); requester.send(str.getbytes(), 0); // client.sends byte[] reply = requester.recv(0); // client.receives
Comments
Post a Comment