Table of Contents

Class CharacterAttributesBroadcastSerializer

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll
public static class CharacterAttributesBroadcastSerializer
Inheritance
CharacterAttributesBroadcastSerializer
Inherited Members

Remarks

Hand written for the count: FishNet's generated array serializer writes a four-byte length and a null sentinel, where this message's count is bounded by the character's attribute sheet and a null array is simply an empty one. The cap also stops a malformed or hostile message making the reader allocate an arbitrarily large array before the stream runs out.

Fields

MAX_ATTRIBUTES

Hard cap on entries in one message.

public const int MAX_ATTRIBUTES = 4096

Field Value

int

Remarks

Comfortably above any real character's sheet (the project's databases hold a few dozen attributes) and small enough that the count fits two bytes.

Methods

ReadCharacterAttributesBroadcast(Reader)

public static CharacterAttributesBroadcast ReadCharacterAttributesBroadcast(this Reader reader)

Parameters

reader Reader

Returns

CharacterAttributesBroadcast

WriteCharacterAttributesBroadcast(Writer, CharacterAttributesBroadcast)

public static void WriteCharacterAttributesBroadcast(this Writer writer, CharacterAttributesBroadcast value)

Parameters

writer Writer
value CharacterAttributesBroadcast