rsiot/components/cmp_websocket_server/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//! Компонент для подключения через websocket server.
//!
//! Перенаправляет поток входящих сообщений подключенным вебсокет-клиентам.
//!
//! При подключении клиенту отправляются все актуальные сообщения из кеша, далее только новые.
//! Используется библиотека [tokio-tungstenite](https://crates.io/crates/tokio-tungstenite).
//!
//! # Пример
//!
//! ```
#![doc = include_str!("../../../examples/cmp_websocket_server.rs")]
//! ```

#![cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]

mod async_task_utils;
mod component;
mod config;
mod errors;
mod fn_process;
mod handle_ws_connection;

pub use component::Cmp;
pub use config::Config;

type Result<T> = std::result::Result<T, errors::Error>;