wse 3.2.0

WebSocket engine for reactive user interfaces: topics with message recovery, presence, clustering without a broker, JWT, end-to-end encryption and signed messages.
Documentation
//! The Python callbacks of callback mode (the alternative to drain mode).

use pyo3::prelude::*;

pub(in crate::server) fn fire_on_connect(callback: &Py<PyAny>, conn_id: &str, cookies: &str) {
    Python::try_attach(|py| {
        if let Err(e) = callback.call1(py, (conn_id, cookies)) {
            tracing::warn!("[WSE] on_connect error: {e}");
        }
    });
}

pub(in crate::server) fn fire_on_disconnect(callback: &Py<PyAny>, conn_id: &str) {
    Python::try_attach(|py| {
        if let Err(e) = callback.call1(py, (conn_id,)) {
            tracing::warn!("[WSE] on_disconnect error: {e}");
        }
    });
}