Skip to main content

Module kcp

Module kcp 

Source
Expand description

KCP wire segment views and stateless scalar helpers. Allocation-free KCP wire segment views and stateless scalar helpers.

This module intentionally excludes KCP endpoint state, retransmission, timers, congestion control, callbacks, and transport policy. When both KCP and UDP are enabled, it provides only an immutable UDP-payload adapter.

Structs§

KcpCommand
A raw KCP command byte, including values not known by this crate.
KcpConversationId
A KCP conversation identifier.
KcpFragment
A KCP fragment number.
KcpSegment
An exact borrowed KCP segment with a structurally complete declared payload.
KcpSegmentBuilder
Builds one complete KCP segment in caller-owned storage.
KcpSegmentIter
A fallible fused iterator over concatenated KCP segments.
KcpSegmentMut
An exact mutable KCP segment with a structurally complete declared payload.
KcpSegments
A nonempty, completely validated concatenated KCP segment sequence.
KcpSequenceNumber
A KCP sequence number interpreted modulo 2^32.
KcpTimestamp
A KCP timestamp interpreted modulo 2^32.
KcpUnacknowledged
A KCP unacknowledged sequence-number marker.

Enums§

KcpKnownCommand
A KCP command defined by the upstream wire format.
KcpSegmentBuildError
Failure to construct one KCP segment in caller-provided storage.
KcpSegmentParseError
Failure to parse one KCP segment.
KcpSegmentsParseError
Failure to validate a complete concatenated KCP segment sequence.

Constants§

KCP_SEGMENT_HEADER_LEN
The fixed KCP segment header length in bytes.