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
53
54
55
56
57
58
59
60
61
62
63
64
//! Channel abstraction system for WebSocket messaging
//!
//! This module provides channel-based messaging capabilities, allowing connections
//! to join/leave channels and enabling targeted message broadcasting to channel members.
//!
//! ## Architecture
//!
//! The channel system is organized into several logical modules:
//!
//! - [`types`] - Core types and data structures
//! - [`channel`] - Individual channel implementation
//! - [`manager`] - Channel lifecycle and management
//! - [`message`] - Channel message types
//! - [`events`] - Event system for channel operations
//!
//! ## Quick Start
//!
//! ```rust
//! use elif_http::websocket::{ChannelManager, ChannelType, ConnectionId};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let manager = ChannelManager::new();
//! let creator_id = ConnectionId::new();
//! let joiner_id = ConnectionId::new();
//!
//! // Create a public channel
//! let channel_id = manager.create_channel(
//! "general".to_string(),
//! ChannelType::Public,
//! Some(creator_id),
//! ).await?;
//!
//! // Join the channel with a different connection
//! manager.join_channel(
//! channel_id,
//! joiner_id,
//! None, // No password needed for public channels
//! Some("Alice".to_string()),
//! ).await?;
//!
//! Ok(())
//! }
//! ```
// Re-export main types for convenience
pub use Channel;
pub use ChannelEvent;
pub use ChannelManager;
pub use ChannelMessage;
pub use ;