Class: Grid::ZMQ::Socket
- Inherits:
-
Object
- Object
- Grid::ZMQ::Socket
- Defined in:
- lib/grid/zmq/socket.rb
Instance Method Summary collapse
-
#initialize(type) ⇒ Socket
constructor
A new instance of Socket.
- #send(method, *attrs) ⇒ Object
Constructor Details
#initialize(type) ⇒ Socket
Returns a new instance of Socket.
4 5 6 7 |
# File 'lib/grid/zmq/socket.rb', line 4 def initialize(type) ctx = ::ZMQ::Context.create @socket = ctx.socket(type) end |
Instance Method Details
#send(method, *attrs) ⇒ Object
9 10 11 |
# File 'lib/grid/zmq/socket.rb', line 9 def send(method, *attrs) error_check(@socket.send(method, *attrs)) end |