Exception: ZMQ::SocketError

Inherits:
ZeroMQError show all
Defined in:
lib/ffi-rzmq/exceptions.rb

Instance Attribute Summary

Attributes inherited from ZeroMQError

#error_code, #message, #result_code, #source

Instance Method Summary collapse

Methods inherited from ZeroMQError

#initialize

Constructor Details

This class inherits a constructor from ZMQ::ZeroMQError

Instance Method Details

#eaddrinuse?Boolean

True when the exception was raised due to the library returning EADDRINUSE.

The given address is already in use.

Returns:

  • (Boolean)


82
# File 'lib/ffi-rzmq/exceptions.rb', line 82

def eaddrinuse?() EADDRINUSE == @error_code; end

#eaddrnotavail?Boolean

True when the exception was raised due to the library returning EADDRNOTAVAIL.

A nonexistent interface was requested or the requested address was not local.

Returns:

  • (Boolean)


90
# File 'lib/ffi-rzmq/exceptions.rb', line 90

def eaddrnotavail?() EADDRNOTAVAIL == @error_code; end

#efsm?Boolean

True when the exception was raised due to the library returning EMTHREAD.

The send or recv operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ::REP.

Returns:

  • (Boolean)


113
# File 'lib/ffi-rzmq/exceptions.rb', line 113

def efsm?() EFSM == @error_code; end

#egain?Boolean

True when the exception was raised due to the library returning EMTHREAD.

Occurs for #send and #recv operations.

  • When calling #send, non-blocking mode was requested

and the message cannot be queued at the moment.

  • When calling #recv, non-blocking mode was requested

and no messages are available at the moment.

Returns:

  • (Boolean)


60
# File 'lib/ffi-rzmq/exceptions.rb', line 60

def egain?() EAGAIN == @error_code; end

#einval?Boolean

True when the exception was raised due to the library returning EMTHREAD.

Occurs under 2 conditions.

  • When creating a new #Socket, the requested socket

type is invalid.

  • When setting socket options with #setsockopt, the

requested option option_name is unknown, or the requested option_len or option_value is invalid.

Returns:

  • (Boolean)


103
# File 'lib/ffi-rzmq/exceptions.rb', line 103

def einval?() EINVAL == @error_code; end

#emthread?Boolean

True when the exception was raised due to the library returning EMTHREAD.

The number of application threads using sockets within this context has been exceeded. See the app_threads parameter of #Context.

Returns:

  • (Boolean)


130
# File 'lib/ffi-rzmq/exceptions.rb', line 130

def emthread?() EMTHREAD == @error_code; end

#enocompatproto?Boolean

True when the exception was raised due to the library returning ENOCOMPATPROTO.

The requested transport protocol is not compatible with the socket type.

Returns:

  • (Boolean)


68
# File 'lib/ffi-rzmq/exceptions.rb', line 68

def enocompatproto?() ENOCOMPATPROTO == @error_code; end

#enotsup?Boolean

True when the exception was raised due to the library returning ENOTSUP.

The send or recv operation is not supported by this socket type.

Returns:

  • (Boolean)


121
# File 'lib/ffi-rzmq/exceptions.rb', line 121

def enotsup?() super; end

#eprotonosupport?Boolean

True when the exception was raised due to the library returning EPROTONOSUPPORT.

The requested transport protocol is not supported.

Returns:

  • (Boolean)


75
# File 'lib/ffi-rzmq/exceptions.rb', line 75

def eprotonosupport?() EPROTONOSUPPORT == @error_code; end