Expand description
Native server runtime for WebSocket, QUIC, TCP, and hybrid listeners.
The server module is available on native targets when the server feature is
enabled. It provides:
FlareServerBuilderfor production integrations built aroundServerEventHandler, authentication, message pipelines, and connection lifecycle hooks.ServerBuilderfor closure-based demos and compact prototypes.ObserverServerBuilderfor integrations that need explicit connection observation.ConnectionManagerandServerHandlefor sending frames, broadcasting, disconnecting clients, and inspecting connection snapshots.
The server stack owns transport admission, negotiation, heartbeat detection, backpressure-aware fanout, and cleanup. Business-specific message semantics should remain in application handlers or higher-level services.
Re-exports§
pub use auth::AuthResult;pub use auth::Authenticator;pub use auth::DefaultAuthenticator;pub use builder::FlareServer;pub use builder::FlareServerBuilder;pub use builder::MessageContext;pub use builder::ObserverServer;pub use builder::ObserverServerBuilder;pub use builder::ServerBuilder;pub use builder::SimpleServer;pub use config::ServerConfig;pub use connection::ConnectionInfo;pub use connection::ConnectionManager;pub use connection::ConnectionManagerTrait;pub use connection::ConnectionStats;pub use device::DeviceConflictStrategy;pub use device::DeviceConflictStrategyBuilder;pub use device::DeviceManager;pub use events::ServerEventHandler;pub use handle::DefaultServerHandle;pub use handle::ServerHandle;pub use heartbeat::HeartbeatDetector;pub use transports::QUICServer;pub use transports::TCPServer;pub use transports::WebSocketServer;pub use transports::ConnectionHandler;pub use transports::HybridServer;pub use transports::Server;pub use crate::common::error::Result;pub use crate::common::error::ServerError;pub use crate::common::config_types::TransportProtocol;
Modules§
- auth
- 服务端认证模块
- builder
- 服务端构建器模块
- config
- 服务端配置模块
- connection
- 服务端连接管理模块
- device
- 服务端设备管理模块
- events
- 服务端事件处理模块
- handle
- 服务器操作处理器模块
- heartbeat
- 服务端心跳模块
- transports
- 服务端传输协议模块