[zeromq-dev] Q: socket type/pattern for protocol exchange

Michael Haberler mail17 at mah.priv.at
Mon Jun 10 09:33:59 CEST 2013


Hi,

I am about to implement a protocol between peers; the phases and interactions being roughly:

- an negotiation phase (peers exchange options and reach agreement or dont)
- an 'open' phase entered on agreement, where state updates flow either direction as needed, not necessarily requiring confirmation
- a shutdown phase initiated by either side

Potentially there might be more than two peers. Message flows and encoding are done (protobuf).

--

The thing I am unsure about is: which socket type should I choose? I dont see an obvious match in here: http://api.zeromq.org/3-3:zmq-socket

the closest thing supporting that rather free-form of exchange of messages would be two pipes made of ZMQ_PUSH/ZMQ_PULL sockets, one pipe per direction and peer

any better suggestions?

- michael






More information about the zeromq-dev mailing list