class LibZMQ::PollItem
PollItem class includes the PollItemLayout module so that we can use the basic FFI accessors to get at the structure's fields. We also want to provide some higher-level Ruby accessors for convenience.
Public Instance Methods
fd()
click to toggle source
# File lib/ffi-rzmq-core/structures.rb, line 83 def fd self[:fd] end
inspect()
click to toggle source
# File lib/ffi-rzmq-core/structures.rb, line 95 def inspect "socket [#{socket}], fd [#{fd}], events [#{self[:events]}], revents [#{self[:revents]}]" end
readable?()
click to toggle source
# File lib/ffi-rzmq-core/structures.rb, line 87 def readable? (self[:revents] & ZMQ::POLLIN) > 0 end
socket()
click to toggle source
# File lib/ffi-rzmq-core/structures.rb, line 79 def socket self[:socket] end
writable?()
click to toggle source
# File lib/ffi-rzmq-core/structures.rb, line 91 def writable? (self[:revents] & ZMQ::POLLOUT) > 0 end