Class CharacterAttributesBroadcastSerializer
Wire format for CharacterAttributesBroadcast.
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
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)
Reads a CharacterAttributesBroadcast.
public static CharacterAttributesBroadcast ReadCharacterAttributesBroadcast(this Reader reader)
Parameters
readerReader
Returns
WriteCharacterAttributesBroadcast(Writer, CharacterAttributesBroadcast)
Writes a CharacterAttributesBroadcast.
public static void WriteCharacterAttributesBroadcast(this Writer writer, CharacterAttributesBroadcast value)
Parameters
writerWritervalueCharacterAttributesBroadcast