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
//! Application-agnostic LMAX-pipeline server runtime.
//!
//! Groups the application-agnostic parts of the Melin server: the
//! accept loop, frame reader, ack-policy wiring, admin
//! endpoint, replication, and the optional DPDK transport. Generic
//! over `A: Application` — the binary supplies a concrete app via
//! [`server::run`] (or `server::run_dpdk` under `feature = "dpdk"`) along with caller-supplied
//! `AppFactory`, `RequestDecoder`, `ResponseEncoder`, and event-
//! publisher fn.
//!
//! The trading-side wiring (`ServerApp`, `ExchangeRequestDecoder`,
//! `ExchangeResponseEncoder`, market-data firehose) lives in the
//! separate `melin-server` crate.
// The two wire bounds an application's codecs have to fit: the widest
// request frame the readers accept, and the widest response frame the
// response stage can encode. Re-exported here so an application can
// assert against them at compile time, next to the bounds it declares
// (`AppEvent::MAX_ENCODED_SIZE` is the journal's; these are the wire's).
pub use MAX_FRAME_SIZE;
pub use MAX_RESPONSE_BUF;
/// Control-plane event the accept loop, reader, and response stage
/// exchange. Transport-agnostic — the payload is a socket fd + writer,
/// not an app event — so both build modes refer to the same type.