Sha256: 016256d4d3d5eb4ed9410b41a13044d530fffd33b3ac81bf2e5e24c1db810f89
Contents?: true
Size: 736 Bytes
Versions: 28
Compression:
Stored size: 736 Bytes
Contents
# encoding: utf-8 class ZMQ::Pollitem # API that allows poll items to send data regardless of the underlying pollable item type (ZMQ::Socket or IO). # def send(*args) case pollable when BasicSocket pollable.send(args.shift, 0) when IO pollable.write_nonblock(*args) when ZMQ::Socket pollable.send(*args) end end # API that allows poll items to recv data regardless of the underlying pollable item type (ZMQ::Socket or IO). # def recv case pollable when BasicSocket # XXX assumed page size pollable.recv_nonblock(4096) when IO # XXX assumed page size pollable.read_nonblock(4096) when ZMQ::Socket pollable.recv_nonblock end end end
Version data entries
28 entries across 28 versions & 1 rubygems