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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! WebSocket support for acton-service
//!
//! This module provides WebSocket server functionality that integrates with
//! the existing HTTP server. WebSocket connections upgrade from HTTP on the
//! same port, allowing seamless coexistence with REST and gRPC.
//!
//! ## Features
//!
//! - **Bidirectional messaging**: Full duplex communication
//! - **Room/channel support**: Actor-based room management
//! - **Broadcasting**: Efficient message distribution
//! - **Authentication**: JWT integration for WebSocket handshake
//! - **Rate limiting**: Per-connection message rate limits
//!
//! ## Example
//!
//! ```rust,ignore
//! use acton_service::prelude::*;
//! use acton_service::websocket::{WebSocketUpgrade, WebSocket};
//!
//! async fn ws_handler(
//! ws: WebSocketUpgrade,
//! State(state): State<AppState>,
//! ) -> impl IntoResponse {
//! ws.on_upgrade(|socket| handle_socket(socket, state))
//! }
//!
//! async fn handle_socket(mut socket: WebSocket, state: AppState) {
//! while let Some(Ok(msg)) = socket.recv().await {
//! // Handle WebSocket messages
//! }
//! }
//! ```
// Re-exports
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
// Re-export axum WebSocket types for convenience
pub use ;