module ZMQ::Util
Extended Modules
Defined in:
zeromq/util.crConstant Summary
-
MSG_ERRORS =
{"zmq_msg_init", "zmq_msg_init_data", "zmq_msg_copy", "zmq_msg_move", "zmq_msg_close", "zmq_msg_get", "zmq_msg_more", "zmq_msg_recv", "zmq_msg_send", "zmq_msg_set"}
Instance Method Summary
-
#bind_to_random_tcp_port(host = "127.0.0.1", max_tries = 500)
Attempts to bind to a random tcp port on +host+ up to +max_tries+ times.
- #curve_keypair
-
#errno
Returns the +errno+ as set by the libzmq library.
-
#error_check(source, result_code)
:doc: Called to verify whether there were any errors during operation.
-
#error_string
Returns a string corresponding to the currently set #errno.
-
#resultcode_ok?(rc)
Returns true when +rc+ is greater than or equal to 0, false otherwise.
Instance Method Detail
Attempts to bind to a random tcp port on +host+ up to +max_tries+ times. Returns the port number upon success or nil upon failure.
:doc: Called to verify whether there were any errors during operation. If any are found, raise the appropriate #ZeroMQError.
When no error is found, this method returns +true+ which is behavior used internally by #send and #recv.
Returns a string corresponding to the currently set #errno. These error strings are defined by libzmq.
Returns true when +rc+ is greater than or equal to 0, false otherwise.
We use the >= test because zmq_poll() returns the number of sockets that had a read or write event triggered. So, a >= 0 result means it succeeded.