Class: EZMQ::Client
Overview
Request socket that sends messages and receives replies.
Instance Attribute Summary
Attributes inherited from Socket
#context, #decode, #encode, #socket
Instance Method Summary (collapse)
-
- (Client) initialize(**options)
constructor
Creates a new Client socket.
-
- (void) request(message = '', **options)
Sends a message and waits to receive a response.
Methods inherited from Socket
#bind, #connect, #listen, #receive, #send
Constructor Details
- (Client) initialize(**options)
Creates a new Client socket.
133 134 135 |
# File 'lib/ezmq.rb', line 133 def initialize(**) super :connect, ZMQ::REQ, end |
Instance Method Details
- (void) request(message = '', **options)
This method returns an undefined value.
Sends a message and waits to receive a response.
146 147 148 149 150 151 152 153 |
# File 'lib/ezmq.rb', line 146 def request( = '', **) send , if block_given? yield receive else receive end end |