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
//! WebSocket protocol implementation (RFC 6455).
//!
//! This module provides complete WebSocket support with Cx integration for
//! structured concurrency and cancel-correctness.
//!
//! # Architecture
//!
//! - `frame`: Wire format encoding/decoding (RFC 6455 Section 5)
//! - `handshake`: HTTP upgrade negotiation (RFC 6455 Section 4)
//! - `close`: Close handshake protocol (RFC 6455 Section 7)
//! - `client`: WebSocket client with Cx integration
//! - `server`: WebSocket server/acceptor with Cx integration
//!
//! # Client Example
//!
//! ```ignore
//! use asupersync::net::websocket::{WebSocket, Message};
//!
//! // Connect to a WebSocket server
//! let ws = WebSocket::connect(&cx, "ws://example.com/chat").await?;
//!
//! // Send a message
//! ws.send(&cx, Message::text("Hello!")).await?;
//!
//! // Receive messages
//! while let Some(msg) = ws.recv(&cx).await? {
//! println!("Received: {:?}", msg);
//! }
//! ```
//!
//! # Server Example
//!
//! ```ignore
//! use asupersync::net::websocket::{WebSocketAcceptor, Message};
//!
//! // Create acceptor
//! let acceptor = WebSocketAcceptor::new().protocol("chat");
//!
//! // Accept upgrade request
//! let ws = acceptor.accept(&cx, request_bytes, tcp_stream).await?;
//!
//! // Echo messages
//! while let Some(msg) = ws.recv(&cx).await? {
//! ws.send(&cx, msg).await?;
//! }
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;