Class: CZTop::Socket::PAIR
- Inherits:
-
CZTop::Socket
- Object
- CZTop::Socket
- CZTop::Socket::PAIR
- Defined in:
- lib/cztop/socket/pair.rb
Overview
Pair socket for inter-thread communication.
Constant Summary
Constants included from FdWait
FdWait::FD_TIMEOUT, FdWait::JIFFY
Constants inherited from CZTop::Socket
Constants included from CZMQ::FFI
CZMQ::FFI::CZMQ_VERSION, CZMQ::FFI::ZFRAME_DONTWAIT, CZMQ::FFI::ZFRAME_MORE, CZMQ::FFI::ZMONITOR_FN, CZMQ::FFI::ZMQ_VERSION
Constants included from ZsockOptions
ZsockOptions::POLLIN, ZsockOptions::POLLOUT
Instance Attribute Summary
Attributes inherited from CZTop::Socket
Attributes included from HasFFIDelegate
Instance Method Summary collapse
-
#initialize(endpoints = nil, curve: nil, linger: 0) ⇒ PAIR
constructor
A new instance of PAIR.
Methods included from Writable
Methods included from FdWait
#wait_for_fd_signal, #wait_for_socket_state
Methods included from Readable
Methods inherited from CZTop::Socket
bind, #bind, #close, #connect, connect, #disconnect, #inspect, #last_endpoint, #set_unbounded, #unbind
Methods included from HasFFIDelegate::ClassMethods
#ffi_delegate, #from_ffi_delegate
Methods included from ZsockOptions
#conflate=, #conflate?, #fd, #heartbeat_ivl, #heartbeat_ivl=, #heartbeat_timeout, #heartbeat_timeout=, #heartbeat_ttl, #heartbeat_ttl=, #identity, #identity=, #immediate=, #immediate?, #ipv6=, #ipv6?, #linger, #linger=, #max_msg_size, #max_msg_size=, #rcvhwm, #rcvhwm=, #readable?, #reconnect_ivl, #reconnect_ivl=, #reconnect_ivl_max, #reconnect_ivl_max=, #recv_timeout, #recv_timeout=, #router_mandatory=, #router_mandatory?, #send_timeout, #send_timeout=, #sndhwm, #sndhwm=, #tcp_keepalive, #tcp_keepalive=, #tcp_keepalive_cnt, #tcp_keepalive_cnt=, #tcp_keepalive_idle, #tcp_keepalive_idle=, #tcp_keepalive_intvl, #tcp_keepalive_intvl=, #to_io, #tos, #tos=, #writable?
Methods included from HasFFIDelegate
#attach_ffi_delegate, #from_ffi_delegate, raise_zmq_err, #to_ptr
Constructor Details
#initialize(endpoints = nil, curve: nil, linger: 0) ⇒ PAIR
Returns a new instance of PAIR.
18 19 20 21 22 23 24 25 |
# File 'lib/cztop/socket/pair.rb', line 18 def initialize(endpoints = nil, curve: nil, linger: 0) super attach_ffi_delegate(Zsock.new(Types::PAIR)) self.linger = linger _apply_curve(curve) _attach(endpoints, default: :connect) end |