lib/ezmq/request.rb in ezmq-0.4.1 vs lib/ezmq/request.rb in ezmq-0.4.2

- old
+ new

@@ -4,16 +4,17 @@ module EZMQ # Request socket that sends messages and receives replies. class Client < EZMQ::Socket # Creates a new Client socket. # + # @param [:bind, :connect] mode (:connect) a mode for the socket. # @param [Hash] options optional parameters. # @see EZMQ::Socket EZMQ::Socket for optional parameters. # # @return [Client] a new instance of Client. # - def initialize(**options) - super :connect, ZMQ::REQ, options + def initialize(mode = :connect, **options) + super mode, ZMQ::REQ, options end # Sends a message and waits to receive a response. # # @param [String] message the message to send.