mosquitto-io

Crates.iomosquitto-io
lib.rsmosquitto-io
version0.1.1
sourcesrc
created_at2023-03-15 08:04:44.456656
updated_at2023-03-15 10:44:14.918609
descriptionSystem bindings to libmosquitto
homepagehttps://github.com/arshidkv12/mosquitto-io
repositoryhttps://github.com/arshidkv12/mosquitto-io
max_upload_size
id810559
size10,523
Arshid (arshidkv12)

documentation

https://github.com/arshidkv12/mosquitto-io

README

mosquitto-sys

Dependencies

clang
libmosquitto-dev

Demode code


use mosquitto_io::{
    mosquitto_auth_check_password, mosquitto_auth_plugin_init, mosquitto_auth_unpwd_check,
    mosquitto_unpwd_check_callback, MOSQ_ERR_AUTH,
};

#[no_mangle]
pub extern "C" fn mosquitto_auth_plugin_init(
    user_data: *mut *mut c_void,
    opts: *const c_char,
    auth_cb: *mut mosquitto_auth_check_password,
    unauth_cb: *mut mosquitto_unpwd_check_callback,
) -> c_int {
    // Initialize your plugin here
    println!("Mosquitto authentication plugin initialized");
    MOSQ_ERR_SUCCESS
}
Commit count: 5

cargo fmt