class

FNetBlobChannel

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

Type aliases

AliasDescription
using FSendFn = std::function<void(uint32_t peerId, const uint8_t* data, size_t len)>

Properties

TypeNameDescription
static constexpr uint32_tkChunkBytesDefault 1024.
static constexpr uint32_tkMinChunkBytesDefault 256.
static constexpr uint32_tkMaxChunkBytesDefault 16384.
static constexpr uint32_tkAckEveryChunksDefault 8.
static constexpr size_tkMaxIncomingPerPeerDefault 4.
static constexpr size_tkMaxQueuedPerPeerDefault 64.
static constexpr uint8_tkFlagCompressedDefault 1.
static constexpr uint32_tkMinCompressBytesBelow this a payload is not worth a compression pass. Default 128.

Public functions

ReturnsNameDescription
voidSetBytesPerSecond
voidSetPeerBytesPerSecondOne peer's rate, overriding the channel's; 0 returns it to the default.
voidSetWindowChunks
voidSetMaxBlobBytes
voidSetMaxIncomingBlobBytes
voidSetReassemblyTimeout
voidSetChunkBytesPayload bytes per chunk, clamped to [kMinChunkBytes, kMaxChunkBytes].
uint32_tGetChunkBytes
voidSetCompressionLevelzstd level for blobs queued from now on; 0 sends them as they are.
voidSetMaxBytesPerPumpMost bytes one Pump sends across all peers, so a burst of joiners cannot make a single frame spend the link's budget.
voidSetMaxQueuedBytesPerPeerA peer's queue holds at most this many payload bytes; a Queue beyond it is refused, which is the producer's signal to wait.
uint32_tQueue
uint32_tQueue
voidPump
voidOnAck
ENetBlobChunkResultOnChunk
voidDropPeer
voidClear
size_tGetQueuedBlobCount
uint64_tGetQueuedBytes
uint32_tGetInFlightChunks
size_tGetIncomingBlobCount
boolIsPeerCongestedTrue while the peer's window is full or its queue is at a cap: sending it more only grows memory.
const FNetBlobStats&GetStats
uint32_tChunkCount
uint32_tChunkCount

Function details

SetBytesPerSecond

C++
void SetBytesPerSecond(uint32_t bytesPerSecond)

SetPeerBytesPerSecond

C++
void SetPeerBytesPerSecond(uint32_t peerId, uint32_t bytesPerSecond)

One peer's rate, overriding the channel's; 0 returns it to the default.

SetWindowChunks

C++
void SetWindowChunks(uint32_t chunks)

SetMaxBlobBytes

C++
void SetMaxBlobBytes(uint32_t bytes)

SetMaxIncomingBlobBytes

C++
void SetMaxIncomingBlobBytes(uint32_t bytes)

SetReassemblyTimeout

C++
void SetReassemblyTimeout(float seconds)

SetChunkBytes

C++
void SetChunkBytes(uint32_t bytes)

Payload bytes per chunk, clamped to [kMinChunkBytes, kMaxChunkBytes]. Size it to the transport MTU less the packet headers; the receiver follows whatever the sender used.

GetChunkBytes

C++
uint32_t GetChunkBytes() const

SetCompressionLevel

C++
void SetCompressionLevel(int32_t level)

zstd level for blobs queued from now on; 0 sends them as they are.

SetMaxBytesPerPump

C++
void SetMaxBytesPerPump(uint32_t bytes)

Most bytes one Pump sends across all peers, so a burst of joiners cannot make a single frame spend the link's budget. 0 = no cap.

SetMaxQueuedBytesPerPeer

C++
void SetMaxQueuedBytesPerPeer(uint32_t bytes)

A peer's queue holds at most this many payload bytes; a Queue beyond it is refused, which is the producer's signal to wait. 0 = no cap.

Queue

C++
uint32_t Queue(uint32_t peerId, std::vector<uint8_t> payload)

Queue

C++
uint32_t Queue(uint32_t peerId, std::vector<uint8_t> payload, const FNetBlobOptions& options)

Pump

C++
void Pump(float deltaTime, const FSendFn& sendChunk)

OnAck

C++
void OnAck(uint32_t peerId, const uint8_t* body, size_t len)

OnChunk

C++
ENetBlobChunkResult OnChunk(uint32_t peerId, const uint8_t* body, size_t len, std::vector<uint8_t>& outPayload, const FSendFn& sendAck)

DropPeer

C++
void DropPeer(uint32_t peerId)

Clear

C++
void Clear()

GetQueuedBlobCount

C++
size_t GetQueuedBlobCount(uint32_t peerId) const

GetQueuedBytes

C++
uint64_t GetQueuedBytes(uint32_t peerId) const

GetInFlightChunks

C++
uint32_t GetInFlightChunks(uint32_t peerId) const

GetIncomingBlobCount

C++
size_t GetIncomingBlobCount(uint32_t peerId) const

IsPeerCongested

C++
bool IsPeerCongested(uint32_t peerId) const

True while the peer's window is full or its queue is at a cap: sending it more only grows memory.

GetStats

C++
const FNetBlobStats& GetStats() const

ChunkCount

C++
static uint32_t ChunkCount(uint32_t totalBytes)

ChunkCount

C++
static uint32_t ChunkCount(uint32_t totalBytes, uint32_t chunkBytes)
Generated from Networking/Replication/NetBlobChannel.h via networking.json · Nov 4, 2026Version 1.0.0