Skip to main content

Module client

Module client 

Source
Expand description

Client-side builders, transports, heartbeat management, and connection state.

Native builds support WebSocket, QUIC, TCP, and hybrid protocol racing depending on enabled features. WASM builds support the browser WebSocket client stack.

Main entry points:

  • FlareClientBuilder for production integrations with a message listener and pipeline-oriented lifecycle.
  • ClientBuilder for closure-based examples and simple applications.
  • ObserverClientBuilder for native integrations that need explicit connection observation and protocol racing.
  • HybridClient for native transport racing when multiple protocols are available.

WASM integrators: read crate::transport::connection for Send/Sync and LocalSet rules, and use the wasm async helpers re-exported by this module for browser entry points.

Re-exports§

pub use builder::ClientBuilder;
pub use builder::FlareClient;
pub use builder::FlareClientBuilder;
pub use builder::MessageListener;
pub use builder::SimpleClient;
pub use config::ClientConfig;
pub use connection::ConnectionState;
pub use connection::ConnectionStateManager;
pub use events::ClientEventHandler;
pub use events::DefaultClientMessageObserver;
pub use heartbeat::HeartbeatManager;
pub use router::AsyncHandler;
pub use router::MessageHandler;
pub use router::MessageRouter;
pub use router::SimpleHandler;
pub use transports::Client;
pub use transports::WebSocketClient;
pub use builder::ObserverClient;
pub use builder::ObserverClientBuilder;
pub use manager::ClientConnectionManager;
pub use transports::HybridClient;
pub use transports::QUICClient;
pub use transports::TCPClient;
pub use crate::common::config_types::TransportProtocol;
pub use crate::common::error::ClientError;
pub use crate::common::error::Result;

Modules§

builder
客户端构建器模块
config
客户端配置模块
connection
客户端连接管理模块
events
客户端事件处理模块
heartbeat
客户端心跳模块
manager
客户端连接管理器
router
客户端消息路由
runtime
Platform runtime hooks for client background tasks.
transports
客户端传输协议模块