lib/ffi-rzmq/socket.rb in ffi-rzmq-1.0.0 vs lib/ffi-rzmq/socket.rb in ffi-rzmq-1.0.1
- old
+ new
@@ -701,19 +701,19 @@
# Version3 only
#
# Disconnect the socket from the given +endpoint+.
#
def disconnect(endpoint)
- LibZMQ.zmq_disconnect(endpoint)
+ LibZMQ.zmq_disconnect(socket, endpoint)
end
# Version3 only
#
# Unbind the socket from the given +endpoint+.
#
def unbind(endpoint)
- LibZMQ.zmq_unbind(endpoint)
+ LibZMQ.zmq_unbind(socket, endpoint)
end
private
@@ -729,13 +729,17 @@
super()
# integer options
[RECONNECT_IVL_MAX, RCVHWM, SNDHWM, RATE, RECOVERY_IVL, SNDBUF, RCVBUF, IPV4ONLY,
ROUTER_BEHAVIOR, TCP_KEEPALIVE, TCP_KEEPALIVE_CNT,
- TCP_KEEPALIVE_IDLE, TCP_KEEPALIVE_INTVL, TCP_ACCEPT_FILTER].each { |option| @option_lookup[option] = 0 }
-
+ TCP_KEEPALIVE_IDLE, TCP_KEEPALIVE_INTVL, TCP_ACCEPT_FILTER, MULTICAST_HOPS
+ ].each { |option| @option_lookup[option] = 0 }
+
# long long options
[MAXMSGSIZE].each { |option| @option_lookup[option] = 1 }
+
+ # string options
+ [LAST_ENDPOINT].each { |option| @option_lookup[option] = 2 }
end
# these finalizer-related methods cannot live in the CommonSocketBehavior
# module; they *must* be in the class definition directly