Comments (2)
Any news on this?
from ffi-rzmq.
Sorry for the long delay in responding. This is not a bug. The Socket#send* methods never raise exceptions. They return -1 from the method and require you to handle the error.
I modified your example to prove it.
require 'ffi-rzmq'
class ZMQTest
def initialize(addr)
@ctx = ::ZMQ::Context.create
@socket = @ctx.socket(::ZMQ::ROUTER)
warn "setting option ::ZMQ::ROUTER_MANDATORY (#{::ZMQ::ROUTER_MANDATORY}) to 1"
@socket.setsockopt(::ZMQ::ROUTER_MANDATORY, 1)
@socket.bind(addr)
end
def test
warn "sending message"
rc = @socket.send_strings(["test_client", "foo"])
rescue
warn "BAD! Sending messages should never raise an exception!"
else
warn "Failed and returned [#{rc}]. Check ZMQ::Util.errno and handle it."
end
end
ZMQTest.new("inproc://server").test
from ffi-rzmq.
Related Issues (20)
- Losing Messages with Router/Dealer after Dealer crashes HOT 6
- FFI::NotFoundError: Function 'zmq_ctx_new' not found in [libzmq.so] HOT 6
- hwserver process hangs on ctrl-C HOT 3
- Improve search for shared object HOT 8
- hanging the whole process HOT 4
- "The libzmq version 4.0.5 is incompatible with ffi-rzmq." HOT 1
- segmentation fault in REP server HOT 15
- issue running zmq helloworld sample HOT 2
- Windows 7 libzmq.dll load is failing HOT 2
- ffi-rzmq(2.0.4) is not compatible with zeromq-4.1.2 HOT 11
- context.terminate hangs HOT 1
- rake -T error HOT 2
- dyld: lazy symbol binding failed: Symbol not found: _randombytes HOT 7
- ZMQ::Context finalizer hangs at program exit HOT 4
- Can't get ipc:// to work HOT 7
- Correct way to exit HOT 15
- ZMQ::Context#terminate is not zeromq 3.2.x compatible HOT 2
- please update keys/certificate to higher standards HOT 2
- ZMQ.select? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffi-rzmq.