Class: LibZMQ::PollItem

Inherits:
Object
  • Object
show all
Defined in:
lib/0mq/poll.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#eventsObject

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

#reventsObject

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