flatland-protocol 0.2.1

Flatland3 wire protocol types and codecs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Flatland3 client ↔ server wire types.
//!
//! v1 uses a versioned envelope and serde-compatible payloads. The default
//! on-wire codec is **postcard** (see [`Codec`] and benchmark in `codec_bench`).

pub mod codec;
pub mod frame;
pub mod types;

pub use codec::{Codec, CodecError, PostcardCodec};
pub use frame::{
    read_client_message, read_server_message, write_client_message, write_server_message, FrameError,
};
pub use types::*;

/// Current protocol version negotiated at session start.
/// Bump when postcard payload layout changes (blueprints v3, vitals regen, …).
pub const PROTOCOL_VERSION: u16 = 6;