Class: LibZMQ::PollItem
- Inherits:
-
Object
- Object
- LibZMQ::PollItem
- Defined in:
- lib/0mq/poll.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#events ⇒ Object
Get the event flags: ZMQ::POLLIN, ZMQ::POLLOUT, ZMQ::POLLERR.
-
#events=(flags) ⇒ Object
Set the event flags: ZMQ::POLLIN, ZMQ::POLLOUT, ZMQ::POLLERR.
-
#revents ⇒ Object
Get requested events that triggered: ZMQ::POLLIN, ZMQ::POLLOUT, ZMQ::POLLERR.
-
#socket=(sock) ⇒ Object
Set the socket to poll for events on.
Instance Method Details
#events ⇒ Object
Get the event flags: ZMQ::POLLIN, ZMQ::POLLOUT, ZMQ::POLLERR. Event flags are bitmasked.
128 129 130 |
# File 'lib/0mq/poll.rb', line 128 def events self[:events] end |
#events=(flags) ⇒ Object
Set the event flags: ZMQ::POLLIN, ZMQ::POLLOUT, ZMQ::POLLERR. Event flags are bitmasked.
135 136 137 |
# File 'lib/0mq/poll.rb', line 135 def events=(flags) self[:events] = flags end |
#revents ⇒ Object
Get requested events that triggered: ZMQ::POLLIN, ZMQ::POLLOUT, ZMQ::POLLERR. Event flags are bitmasked.
142 143 144 |
# File 'lib/0mq/poll.rb', line 142 def revents self[:revents] end |
#socket=(sock) ⇒ Object
Set the socket to poll for events on. Accepts a ZMQ::Socket or a pointer.
148 149 150 |
# File 'lib/0mq/poll.rb', line 148 def socket=(sock) self[:socket] = sock.is_a?(FFI::Pointer) ? sock : sock.to_ptr end |