Class ZMQ::Util
In: lib/ffi-rzmq/util.rb
Parent: Object

General utility methods.

Methods

Public Class methods

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.

Generate and return a CURVE public/private keypair

Raises an error if ZeroMQ is not configured for CURVE connections. Install libsodium if this is the case.

Returns the errno as set by the libzmq library.

: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.

[Validate]