class

FSpatialStreamServer

Module
Networking
Header
#include "Networking/Replication/SpatialStream.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
voidSetConfig
const FSpatialStreamConfig&GetConfig
uint32_tPublishAppends a delta to a key's history and returns its version (1, 2, ...
boolCompactReplaces every history entry up to and including throughVersion with one snapshot entry at that version.
uint32_tGetVersion
size_tGetHistoryEntryCount
size_tGetHistoryBytes
size_tGetKeyCount
voidAddClient
voidRemoveClient
boolHasClient
voidSetInterestExplicit interest, nearest first: the first key sends first.
voidSetInterestRadiusRadius interest: a key enters the set at distance <= enterRadius and leaves only beyond leaveRadius, so walking along a border does not make a key flap in and out.
voidRefreshInterest
voidSetKnownVersionWhat the client says it already has (a persisted cache), so a rejoin resends only what changed.
boolIsInInterest
uint32_tGetAckedVersion
voidOnPacketPackets arriving from a client: acknowledgements and interest updates.
voidTickSends what each client's budget allows, nearest first.
FSpatialClientStatsGetClientStats
voidClear

Function details

SetConfig

C++
void SetConfig(const FSpatialStreamConfig& config)

GetConfig

C++
const FSpatialStreamConfig& GetConfig() const

Publish

C++
uint32_t Publish(const FSpatialKey& key, std::vector<uint8_t> payload)

Appends a delta to a key's history and returns its version (1, 2, ... per key, strictly increasing). Interested clients get it on their next Tick.

Compact

C++
bool Compact(const FSpatialKey& key, uint32_t throughVersion, std::vector<uint8_t> snapshotPayload)

Replaces every history entry up to and including throughVersion with one snapshot entry at that version. A client already past it is unaffected; a client behind it receives the snapshot and then the later deltas. False if the key or version is unknown.

GetVersion

C++
uint32_t GetVersion(const FSpatialKey& key) const

GetHistoryEntryCount

C++
size_t GetHistoryEntryCount(const FSpatialKey& key) const

GetHistoryBytes

C++
size_t GetHistoryBytes(const FSpatialKey& key) const

GetKeyCount

C++
size_t GetKeyCount() const

AddClient

C++
void AddClient(uint32_t clientId)

RemoveClient

C++
void RemoveClient(uint32_t clientId)

HasClient

C++
bool HasClient(uint32_t clientId) const

SetInterest

C++
void SetInterest(uint32_t clientId, const std::vector<FSpatialKey>& keysNearestFirst)

Explicit interest, nearest first: the first key sends first.

SetInterestRadius

C++
void SetInterestRadius(uint32_t clientId, FSpatialDistanceFn distance, float enterRadius, float leaveRadius)

Radius interest: a key enters the set at distance <= enterRadius and leaves only beyond leaveRadius, so walking along a border does not make a key flap in and out. Nearest sends first. Re-evaluated every interestRefreshSeconds and whenever a new key is published.

RefreshInterest

C++
void RefreshInterest(uint32_t clientId)

SetKnownVersion

C++
void SetKnownVersion(uint32_t clientId, const FSpatialKey& key, uint32_t version)

What the client says it already has (a persisted cache), so a rejoin resends only what changed.

IsInInterest

C++
bool IsInInterest(uint32_t clientId, const FSpatialKey& key) const

GetAckedVersion

C++
uint32_t GetAckedVersion(uint32_t clientId, const FSpatialKey& key) const

OnPacket

C++
void OnPacket(uint32_t clientId, const uint8_t* data, size_t len)

Packets arriving from a client: acknowledgements and interest updates.

Tick

C++
void Tick(float deltaTime, const FSpatialSendFn& send)

Sends what each client's budget allows, nearest first.

GetClientStats

C++
FSpatialClientStats GetClientStats(uint32_t clientId) const

Clear

C++
void Clear()
Generated from Networking/Replication/SpatialStream.h via networking.json · Nov 4, 2026Version 1.0.0