Parent

Methods

Files

ZMQ::Pollitem

Public Instance Methods

recv() click to toggle source

API that allows poll items to recv data regardless of the underlying pollable item type (ZMQ::Socket or IO).

# File lib/zmq/pollitem.rb, line 16
def recv
  case pollable
  when IO
    # XXX assumed page size
    pollable.read_nonblock(4096)
  when ZMQ::Socket
    pollable.recv_nonblock
  end
end
send(*args) click to toggle source

API that allows poll items to send data regardless of the underlying pollable item type (ZMQ::Socket or IO).

# File lib/zmq/pollitem.rb, line 5
def send(*args)
  case pollable
  when IO
    pollable.write_nonblock(*args)
  when ZMQ::Socket
    pollable.send(*args)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.