我正在使用 zmq req/rep 模式通信。实现非常简单,req 发送一些数据并等待 recv。代表接收数据、处理并回复。
//REQ
zmq_connect
zmq_send
zmq_recv //blocking
zmq_close
//REP
zmq_bind
while(true) {
while(data_received) {
//miscellaneous process
zmq_recv //non-blocking
Print zmq_error_no if zmq_recv fails
}
zmq_send
}
在 REP 端,在 zmq_recv 超时期间将打印 zmq_error_no 11。但有时我会收到错误号 156384763。谁能告诉我该错误的含义?
最佳答案
这是 native ZeroMQ 错误 EFSM:
The zmq_send() operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP.
关于c++ - zmq错误代码156384763的原因,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28989226/