Module: Mosquitto

Defined in:
lib/mosquitto/version.rb,
ext/mosquitto/mosquitto_ext.c

Defined Under Namespace

Modules: Logging Classes: Client, Error, Message

Constant Summary collapse

VERSION =
"0.3"
AT_MOST_ONCE =

Message QOS specific constants

INT2NUM(0)
AT_LEAST_ONCE =
INT2NUM(1)
EXACTLY_ONCE =
INT2NUM(2)
LOG_NONE =

Log specific constants *

INT2NUM(0x00)
LOG_INFO =
INT2NUM(0x01)
LOG_NOTICE =
INT2NUM(0x02)
LOG_WARNING =
INT2NUM(0x04)
LOG_ERR =
INT2NUM(0x08)
LOG_DEBUG =
INT2NUM(0x10)
LOG_SUBSCRIBE =
INT2NUM(0x20)
LOG_UNSUBSCRIBE =
INT2NUM(0x40)
LOG_ALL =
INT2NUM(0xFFFF)
SSL_VERIFY_NONE =

TLS specific constants

INT2NUM(0)
SSL_VERIFY_PEER =
INT2NUM(1)

Class Method Summary collapse

Class Method Details

.cleanupnil

Release resources associated with the libmosquitto library.

Examples

Mosquitto.cleanup -> nil

Returns:

  • (nil)


39
40
41
42
43
# File 'ext/mosquitto/mosquitto_ext.c', line 39

static VALUE rb_mosquitto_cleanup(MOSQ_UNUSED VALUE obj)
{
    mosquitto_lib_cleanup();
    return Qnil;
}

.versionInteger

The libmosquitto version linked against. It returns for libmosquitto 1.2.3 an integer as :

1002003

Examples

Mosquitto.version -> 1002003

Returns:

  • (Integer)


24
25
26
27
# File 'ext/mosquitto/mosquitto_ext.c', line 24

static VALUE rb_mosquitto_version(MOSQ_UNUSED VALUE obj)
{
    return INT2NUM(mosquitto_lib_version(NULL, NULL, NULL));
}