Crates.io | mosquitto-io |
lib.rs | mosquitto-io |
version | 0.1.1 |
source | src |
created_at | 2023-03-15 08:04:44.456656 |
updated_at | 2023-03-15 10:44:14.918609 |
description | System bindings to libmosquitto |
homepage | https://github.com/arshidkv12/mosquitto-io |
repository | https://github.com/arshidkv12/mosquitto-io |
max_upload_size | |
id | 810559 |
size | 10,523 |
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
}