Table of Contents

Class PacketCompressionSampler

Namespace
FishMMO.Server.Implementation
Assembly
FishMMO.Server.dll

Counts every byte of every packet the server sends and receives over a window, to measure what PacketCompression would save and to train its tables (PacketCompressionTables).

public sealed class PacketCompressionSampler
Inheritance
PacketCompressionSampler
Inherited Members

Remarks

Observes FishNet's own packets (FishNet.Managing.Transporting.TransportManager.OnServerPacketObserved), before any compression, so the histogram is the true distribution a table must code. The estimate is for a code trained on this same sample, so it is the best a static table could do on it: a table trained on one run and used on another does a little worse.

Methods

Finish(List<string>)

Stops and reports: a summary line per direction for summary, and the full histograms (the training data) as the returned text for the log.

public string Finish(List<string> summary)

Parameters

summary List<string>

Returns

string

Start()

Starts counting. Only one sampler can observe at a time; a second start replaces the first.

public void Start()

Stop()

Stops counting.

public void Stop()