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
//! Passive HTTP/1.x observer.
//!
//! Bridges [`httparse`](https://crates.io/crates/httparse)'s
//! zero-copy parser into `flowscope`'s [`Reassembler`](crate::Reassembler)
//! and [`SessionParser`](crate::SessionParser) abstractions.
//! Receives bytes from the per-flow TCP stream, emits parsed
//! [`HttpRequest`] / [`HttpResponse`] events.
//!
//! Two integration shapes ship side by side:
//!
//! - [`HttpFactory`] — callback-style. Pair with
//! `with_async_reassembler(...)` from `netring` (or
//! [`FlowDriver`](crate::FlowDriver) for sync use).
//! - [`HttpParser`] — typed message stream. Pair with
//! `session_stream(...)` from `netring`.
//!
//! Pick whichever fits your async/sync style.
//!
//! # Quick start
//!
//! ```no_run
//! use flowscope::http::{HttpFactory, HttpHandler, HttpRequest, HttpResponse};
//!
//! struct Logger;
//! impl HttpHandler for Logger {
//! fn on_request(&self, req: &HttpRequest) {
//! println!("{} {}", req.method, req.path);
//! }
//! fn on_response(&self, resp: &HttpResponse) {
//! println!(" -> {} {}", resp.status, resp.reason);
//! }
//! }
//! ```
//!
//! # Scope
//!
//! - HTTP/1.0 and HTTP/1.1.
//! - Request line + headers + body via Content-Length.
//! - Pipelined requests on one connection.
//! - HTTP/2 / HTTP/3: out of scope.
//! - Chunked Transfer-Encoding: deferred.
pub use ;
pub use Error;
pub use ;
pub use ;