Skip to main content

NetworkTransportStatistic

An abstract class in Root.Township, Alta.Utilities.Profiling.NetworkTransportMetrics.

Base for a set of outgoing network transport stats (messages, packets, bytes) used by the networking profiler.

Constructors​

MemberWhat it is
NetworkTransportStatistic()Creates a NetworkTransportStatistic with default values.

Fields​

MemberWhat it is
protected const int NumberPadWidthColumn width for numbers in the summary text.
protected NetworkTransportStatisticField outgoingFullBytesCountTotalOutgoing bytes including UDP and ethernet headers.
protected NetworkTransportCountStatisticField outgoingMessageCountTotalNumber of outgoing messages.
protected NetworkTransportCountStatisticField outgoingPacketCountTotalNumber of outgoing packets (messages are packed into packets).
protected NetworkTransportStatisticField outgoingSystemBytesCountTotalOutgoing bytes including protocol headers and messages.
protected NetworkTransportStatisticField outgoingUserBytesCountTotalOutgoing payload bytes only.
protected const int StringPadWidthColumn width for labels in the summary text.

Methods​

MemberWhat it is
virtual string CreateSummaryDump(float statisticDuration)Text summary of all stats over a duration.
virtual void ResetAll()Resets every stat's totals.
abstract void UpdateAllStatisticValues()Subclass: reads fresh values from the transport.
void UpdateTotalBytesPerFrame()Does nothing.
void UpdateTotalBytesPerLastSecond()Refreshes values and updates each stat's per-second figure.
protected void CheckError(byte error)Logs a non-zero Unity network error code.
protected abstract void SetupFields()Subclass: creates the stat fields.
protected abstract void UpdateTotalBytesPerLastSecondForExtraFields()Subclass: per-second update for extra fields.