class
FNetBlobChannel
- Module
- Networking
- Header
#include "Networking/Replication/NetBlobChannel.h"- Namespace
Mowo
Type aliases
| Alias | Description |
|---|---|
using FSendFn = std::function<void(uint32_t peerId, const uint8_t* data, size_t len)> |
Properties
| Type | Name | Description |
|---|---|---|
static constexpr uint32_t | kChunkBytes | Default 1024. |
static constexpr uint32_t | kMinChunkBytes | Default 256. |
static constexpr uint32_t | kMaxChunkBytes | Default 16384. |
static constexpr uint32_t | kAckEveryChunks | Default 8. |
static constexpr size_t | kMaxIncomingPerPeer | Default 4. |
static constexpr size_t | kMaxQueuedPerPeer | Default 64. |
static constexpr uint8_t | kFlagCompressed | Default 1. |
static constexpr uint32_t | kMinCompressBytes | Below this a payload is not worth a compression pass. Default 128. |
Public functions
| Returns | Name | Description |
|---|---|---|
void | SetBytesPerSecond | |
void | SetPeerBytesPerSecond | One peer's rate, overriding the channel's; 0 returns it to the default. |
void | SetWindowChunks | |
void | SetMaxBlobBytes | |
void | SetMaxIncomingBlobBytes | |
void | SetReassemblyTimeout | |
void | SetChunkBytes | Payload bytes per chunk, clamped to [kMinChunkBytes, kMaxChunkBytes]. |
uint32_t | GetChunkBytes | |
void | SetCompressionLevel | zstd level for blobs queued from now on; 0 sends them as they are. |
void | SetMaxBytesPerPump | Most bytes one Pump sends across all peers, so a burst of joiners cannot make a single frame spend the link's budget. |
void | SetMaxQueuedBytesPerPeer | 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. |
uint32_t | Queue | |
uint32_t | Queue | |
void | Pump | |
void | OnAck | |
ENetBlobChunkResult | OnChunk | |
void | DropPeer | |
void | Clear | |
size_t | GetQueuedBlobCount | |
uint64_t | GetQueuedBytes | |
uint32_t | GetInFlightChunks | |
size_t | GetIncomingBlobCount | |
bool | IsPeerCongested | True while the peer's window is full or its queue is at a cap: sending it more only grows memory. |
const FNetBlobStats& | GetStats | |
uint32_t | ChunkCount | |
uint32_t | ChunkCount |
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() constSetCompressionLevel
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) constGetQueuedBytes
C++
uint64_t GetQueuedBytes(uint32_t peerId) constGetInFlightChunks
C++
uint32_t GetInFlightChunks(uint32_t peerId) constGetIncomingBlobCount
C++
size_t GetIncomingBlobCount(uint32_t peerId) constIsPeerCongested
C++
bool IsPeerCongested(uint32_t peerId) constTrue 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() constChunkCount
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