Skip to content

ludus::network

Ludus Wiki · API overview · Browse API

Namespace

Declared in modules/network/core/include/ludus/network/core/link_simulator.h

Enumerations

LinkStatus

enum class LinkStatus : uint8

Related types: uint8

Ok

Ok

Dropped

Dropped

InvalidArgument

InvalidArgument

InvalidTime

InvalidTime

Full

Full

Empty

Empty

TimeOverflow

TimeOverflow

SequenceExhausted

SequenceExhausted

Declared in modules/network/core/include/ludus/network/core/link_simulator.h

QueueStatus

enum class QueueStatus : uint8

Related types: uint8

Ok

Ok

ReplacedSnapshot

ReplacedSnapshot

InvalidMessage

InvalidMessage

Full

Full

Empty

Empty

BudgetTooSmall

BudgetTooSmall

Declared in modules/network/core/include/ludus/network/core/send_queue.h

SequenceStatus

enum class SequenceStatus : uint8

Related types: uint8

Newest

Newest

OutOfOrder

OutOfOrder

Duplicate

Duplicate

TooOld

TooOld

Ambiguous

Ambiguous

Declared in modules/network/core/include/ludus/network/core/sequence.h

Channel

enum class Channel : uint8

Related types: uint8

Control

Control

Input

Input

Snapshot

Snapshot

Bulk

Bulk

Declared in modules/network/core/include/ludus/network/core/wire.h

WireStatus

enum class WireStatus : uint8

Related types: uint8

Ok

Ok

InvalidArgument

InvalidArgument

BufferTooSmall

BufferTooSmall

MalformedMessage

MalformedMessage

UnsupportedVersion

UnsupportedVersion

Declared in modules/network/core/include/ludus/network/core/wire.h

Constants and variables

SIMULATOR_CAPACITY

constexpr usize ludus::network::SIMULATOR_CAPACITY = 32

Related types: usize

Declared in modules/network/core/include/ludus/network/core/link_simulator.h

SEND_QUEUE_CAPACITY_PER_CHANNEL

constexpr usize ludus::network::SEND_QUEUE_CAPACITY_PER_CHANNEL = 8

Related types: usize

Declared in modules/network/core/include/ludus/network/core/send_queue.h

MAX_MESSAGE_BYTES

constexpr usize ludus::network::MAX_MESSAGE_BYTES = 1200
Application message bound, including our envelope; not a transport path MTU.

Related types: usize

Declared in modules/network/core/include/ludus/network/core/wire.h

MESSAGE_HEADER_BYTES

constexpr usize ludus::network::MESSAGE_HEADER_BYTES = 24

Related types: usize

Declared in modules/network/core/include/ludus/network/core/wire.h

WIRE_VERSION

constexpr uint8 ludus::network::WIRE_VERSION = 1

Related types: uint8

Declared in modules/network/core/include/ludus/network/core/wire.h

CHANNEL_COUNT

constexpr usize ludus::network::CHANNEL_COUNT = 4

Related types: usize

Declared in modules/network/core/include/ludus/network/core/wire.h

Functions

EncodeMessage

WireStatus ludus::network::EncodeMessage(const MessageHeader &header, std::span< const uint8 > payload, std::span< uint8 > destination, usize &written) noexcept
Exact length, magic, version, lane, reserved fields and epoch are checked.
Failure leaves destination/written/view unchanged. Encode buffers and payload must not overlap. Decode never asserts on untrusted bytes or allocates.

Related types: uint8 · usize · WireStatus · MessageHeader

Declared in modules/network/core/include/ludus/network/core/wire.h

DecodeMessage

WireStatus ludus::network::DecodeMessage(std::span< const uint8 > bytes, MessageView &view) noexcept
Validate the complete envelope and return a view borrowed from bytes. Failure preserves view; the source must outlive use of the resulting payload.

Related types: uint8 · WireStatus · MessageView

Declared in modules/network/core/include/ludus/network/core/wire.h

Aliases

uint32

using ludus::foundation::core::uint32 = std::uint32_t
Exact 32-bit unsigned integer for explicit-width values.

Declared in modules/network/core/include/ludus/network/core/sequence.h

uint64

using ludus::foundation::core::uint64 = std::uint64_t
Exact 64-bit unsigned integer for explicit-width values.

Declared in modules/network/core/include/ludus/network/core/sequence.h

uint8

using ludus::foundation::core::uint8 = std::uint8_t
Exact 8-bit unsigned integer for explicit-width values.

Declared in modules/network/core/include/ludus/network/core/sequence.h

uint16

using ludus::foundation::core::uint16 = std::uint16_t
Exact 16-bit unsigned integer for explicit-width values.

Declared in modules/network/core/include/ludus/network/core/wire.h

uint32

using ludus::foundation::core::uint32 = std::uint32_t
Exact 32-bit unsigned integer for explicit-width values.

Declared in modules/network/core/include/ludus/network/core/wire.h

uint64

using ludus::foundation::core::uint64 = std::uint64_t
Exact 64-bit unsigned integer for explicit-width values.

Declared in modules/network/core/include/ludus/network/core/wire.h

uint8

using ludus::foundation::core::uint8 = std::uint8_t
Exact 8-bit unsigned integer for explicit-width values.

Declared in modules/network/core/include/ludus/network/core/wire.h

usize

using ludus::foundation::core::usize = std::size_t
Native unsigned size/index type; matches sizeof and container sizes, not a wire format.

Declared in modules/network/core/include/ludus/network/core/wire.h