Skip to content

Packet System

Алексей . edited this page Oct 22, 2026 · 9 revisions

Packet and RPC IDs are separate namespaces. Use RakNetPacketId and SampRpcId from SFSharp.Abstractions.Network.Protocol; old EPacketId/ERpcId names and Arizona enums are not the current core API.

Incoming/outgoing are relative to the client. A server-broadcast sync body is not necessarily the same packed structure as the client's outgoing body: player prefixes and compression differ. Do not reinterpret both directions using one unmanaged struct.

SF.Protocol supplies standard models and parser catalogs. Unknown or malformed input can remain raw; an enum match does not validate the payload. Optional libraries own custom IDs and sub-ID formats.

Respect DataBitOffset and DataBitLength for incoming RPC frames. They can refer to an unaligned payload inside a larger retained buffer. Outgoing RPC data generally contains payload only. Packet data includes its ID; timestamp wrappers preserve original ID 40 and expose an explicit inner view.

See raw handling, bitstreams, timestamps, standard packet IDs, RPC IDs and parsers.

Clone this wiki locally