ZeroMQ C++多线程服务器示例运行时错误
我正在尝试运行 ZeroMQ 多线程 C++ 服务器示例,它可以通过
$ g++ server.cpp -lpthread -lzmq -o server -Wall
使用操作系统 构建良好X 10.6.5、gcc 版本 4.2.1(Apple Inc. build 5664)和 Zeromq2 的最新主分支(12 月 1 日)。但是,在启动服务器(使用 ./server)后,我立即收到运行时错误
terminate called after throwing an instance of 'zmq::error_t'
what(): Operation not supported by device
博客上提供的代码是否不再是最新的?或者我配置错误? ZMQ 似乎对我来说工作正常,否则在这台机器上(简单的请求/回复套接字模式)。
I'm trying to run the ZeroMQ multithreaded C++ server example, which builds fine with
$ g++ server.cpp -lpthread -lzmq -o server -Wall
Using OS X 10.6.5, gcc version 4.2.1 (Apple Inc. build 5664), and zeromq2's lastest master branch (Dec 1st). However I'm getting a runtime error immediately after I start the server (with ./server)
terminate called after throwing an instance of 'zmq::error_t'
what(): Operation not supported by device
Is the code provided on the blog no longer current? Or or have I misconfigured? ZMQ seems to be working fine for me otherwise on this machine (simple request/reply socket patterns).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
荒谬的。
"tcp://localhost:5555"
将失败,但"tcp://127.0.0.1:5555"
工作正常。更新 1:
/etc/hosts
有一个localhost
条目,所以我不认为这是问题所在。我也尝试过使用tcp://lo:5555
但没有成功。Ridiculous.
"tcp://localhost:5555"
will fail, but"tcp://127.0.0.1:5555"
works fine.Update 1:
/etc/hosts
has an entry forlocalhost
so I don't believe that's the problem. I've also tried usingtcp://lo:5555
to no success.