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
65
66
67
68
69
70
//! # AEX - Async-first, Executor-based Web/TCP/UDP Framework
//!
//! A lightweight, async-first Rust web framework with explicit middleware execution
//! and native WebSocket support.
//!
//! ## Core Features
//!
//! - **Intuitive HTTP Routing**: Trie-tree based router supporting static, param, and wildcard paths
//! - **Explicit Middleware Chain**: Linear execution order, predictable control flow (not onion model)
//! - **Native WebSocket**: Natural integration as middleware, shares HTTP context
//! - **Multi-Protocol**: Unified server for HTTP, TCP, and UDP
//!
//! ## Quick Example
//!
//! ```rust,ignore
//! use aex::http::router::{NodeType, Router as HttpRouter};
//! use aex::server::HTTPServer;
//! use aex::tcp::types::{Command, RawCodec};
//! use aex::exe;
//! use std::net::SocketAddr;
//! use std::sync::Arc;
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! let addr: SocketAddr = "0.0.0.0:8080".parse()?;
//! let mut router = HttpRouter::new(NodeType::Static("root".into()));
//!
//! router.get("/", exe!(|ctx| {
//! ctx.send("Hello, World!");
//! true
//! })).register();
//!
//! HTTPServer::new(addr, None)
//! .http(router)
//! .start_with_protocols::<RawCodec, RawCodec>(Arc::new(|c| c.id()))
//! .await?;
//! Ok(())
//! }
//! ```
//!
//! ## Architecture
//!
//! - Server: Multi-protocol server (HTTP/TCP/UDP)
//! - Router: Trie-tree based HTTP router
//! - Executor Chain: Linear middleware + handler execution
//!
//! ## Modules
//!
//! - `http`: HTTP web framework
//! - `tcp`: TCP protocol support
//! - `udp`: UDP protocol support
//! - `connection`: Connection management
//! - `crypto`: Cryptography utilities
//! - `communicators`: IPC patterns (pub/sub, events, pipes)
pub use ;