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(mode = :connect, **options)
constructor
Creates a new Client socket.
-
- (void) request(message = '', **options)
Sends a message and waits to receive a response.
Methods inherited from Socket
#connect, #listen, #receive, #send
Constructor Details
- (Client) initialize(mode = :connect, **options)
Creates a new Client socket.
15 16 17 |
# File 'lib/ezmq/request.rb', line 15 def initialize(mode = :connect, **) super mode, 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.
28 29 30 31 32 33 34 35 |
# File 'lib/ezmq/request.rb', line 28 def request( = '', **) send , if block_given? yield receive else receive end end |