Message Class
Namespace: Riptide
Assembly: RiptideNetworking.dll
Provides functionality for converting data to bytes and vice versa.
public class Message
Inherited Members
Fields
| MaxHeaderSize | The maximum number of bits required for a message's header. |
Properties
| BytesInUse | How many of this message's bytes are in use. Rounds up to the next byte because only whole bytes can be sent. |
| InstancesPerPeer | How many messages to add to the pool for each Server or Client instance that is started. |
| MaxPayloadSize | The maximum number of bytes of payload data that a message can contain. This value represents how many bytes can be added to a message on top of the MaxHeaderSize. |
| MaxSize | The maximum number of bytes that a message can contain, including the MaxHeaderSize. |
| ReadBits | How many bits have been retrieved from the message. |
| ReadLength | How many bytes have been retrieved from the message. |
| SendMode | The message's send mode. |
| UnreadBits | How many unretrieved bits remain in the message. |
| UnreadLength | How many more bytes can be retrieved from the message. |
| UnwrittenBits | How many more bits can be added to the message. |
| WrittenBits | How many bits have been added to the message. |
| WrittenLength | How many bytes have been added to the message. |
Methods
| Add(bool) | Adds a bool to the message. |
| Add(bool[], bool) | Adds a bool array to the message. |
| Add(byte) | Adds a byte to the message. |
| Add(byte[], bool) | Adds a byte array to the message. |
| Add(double) | Adds a double to the message. |
| Add(double[], bool) | Adds a double array to the message. |
| Add(short) | Adds a short to the message. |
| Add(short[], bool) | Adds a short array to the message. |
| Add(int) | Adds an int to the message. |
| Add(int[], bool) | Adds an int array message. |
| Add(long) | Adds a long to the message. |
| Add(long[], bool) | Adds a long array to the message. |
| Add(sbyte) | Adds an sbyte to the message. |
| Add(sbyte[], bool) | Adds an sbyte array to the message. |
| Add(float) | Adds a float to the message. |
| Add(float[], bool) | Adds a float array to the message. |
| Add(string) | Adds a string to the message. |
| Add(string[], bool) | Adds a string array to the message. |
| Add(ushort) | Adds a ushort to the message. |
| Add(ushort[], bool) | Adds a ushort array to the message. |
| Add(uint) | Adds a uint to the message. |
| Add(uint[], bool) | Adds a uint array to the message. |
| Add(ulong) | Adds a ulong to the message. |
| Add(ulong[], bool) | Adds a ulong array to the message. |
| AddBits(byte, int) | Adds up to 8 of the given bits to the message. |
| AddBits(ushort, int) | Adds up to 16 of the given bits to the message. |
| AddBits(uint, int) | Adds up to 32 of the given bits to the message. |
| AddBits(ulong, int) | Adds up to 64 of the given bits to the message. |
| AddBool(bool) | Adds a bool to the message. |
| AddBools(bool[], bool) | Adds a bool array to the message. |
| AddByte(byte) | Adds a byte to the message. |
| AddBytes(byte[], bool) | Adds a byte array to the message. |
| AddBytes(byte[], int, int, bool) | Adds a byte array to the message. |
| AddDouble(double) | Adds a double to the message. |
| AddDoubles(double[], bool) | Adds a double array to the message. |
| AddFloat(float) | Adds a float to the message. |
| AddFloats(float[], bool) | Adds a float array to the message. |
| AddInt(int) | Adds an int to the message. |
| AddInts(int[], bool) | Adds an int array message. |
| AddLong(long) | Adds a long to the message. |
| AddLongs(long[], bool) | Adds a long array to the message. |
| AddMessage(Message) | Adds |
| AddMessage(Message, int, int) | Adds a range of bits from |
| AddSByte(sbyte) | Adds an sbyte to the message. |
| AddSBytes(sbyte[], bool) | Adds an sbyte array to the message. |
| AddSerializable<T>(T) | Adds a serializable to the message. |
| AddSerializables<T>(T[], bool) | Adds an array of serializables to the message. |
| AddShort(short) | Adds a short to the message. |
| AddShorts(short[], bool) | Adds a short array to the message. |
| AddString(string) | Adds a string to the message. |
| AddStrings(string[], bool) | Adds a string array to the message. |
| AddUInt(uint) | Adds a uint to the message. |
| AddUInts(uint[], bool) | Adds a uint array to the message. |
| AddULong(ulong) | Adds a ulong to the message. |
| AddULongs(ulong[], bool) | Adds a ulong array to the message. |
| AddUShort(ushort) | Adds a ushort to the message. |
| AddUShorts(ushort[], bool) | Adds a ushort array to the message. |
| AddVarLong(long) | Adds a positive or negative number to the message, using fewer bits for smaller values. |
| AddVarULong(ulong) | Adds a positive number to the message, using fewer bits for smaller values. |
| Add<T>(T) | Adds a serializable to the message. |
| Add<T>(T[], bool) | Adds an array of serializables to the message. |
| Create() | Gets a completely empty message instance with no header. |
| Create(MessageSendMode) | Gets a message instance that can be used for sending. |
| Create(MessageSendMode, Enum) | Gets a message instance that can be used for sending. |
| Create(MessageSendMode, ushort) | Gets a message instance that can be used for sending. |
| GetBits(int, out byte) | Retrieves the next |
| GetBits(int, out ushort) | Retrieves the next |
| GetBits(int, out uint) | Retrieves the next |
| GetBits(int, out ulong) | Retrieves the next |
| GetBool() | Retrieves a bool from the message. |
| GetBools() | Retrieves a bool array from the message. |
| GetBools(bool[], int) | Populates a bool array with bools retrieved from the message. |
| GetBools(int) | Retrieves a bool array from the message. |
| GetBools(int, bool[], int) | Populates a bool array with bools retrieved from the message. |
| GetByte() | Retrieves a byte from the message. |
| GetBytes() | Retrieves a byte array from the message. |
| GetBytes(byte[], int) | Populates a byte array with bytes retrieved from the message. |
| GetBytes(int) | Retrieves a byte array from the message. |
| GetBytes(int, byte[], int) | Populates a byte array with bytes retrieved from the message. |
| GetDouble() | Retrieves a double from the message. |
| GetDoubles() | Retrieves a double array from the message. |
| GetDoubles(double[], int) | Populates a double array with doubles retrieved from the message. |
| GetDoubles(int) | Retrieves a double array from the message. |
| GetDoubles(int, double[], int) | Populates a double array with doubles retrieved from the message. |
| GetFloat() | Retrieves a float from the message. |
| GetFloats() | Retrieves a float array from the message. |
| GetFloats(int) | Retrieves a float array from the message. |
| GetFloats(int, float[], int) | Populates a float array with floats retrieved from the message. |
| GetFloats(float[], int) | Populates a float array with floats retrieved from the message. |
| GetInt() | Retrieves an int from the message. |
| GetInts() | Retrieves an int array from the message. |
| GetInts(int) | Retrieves an int array from the message. |
| GetInts(int, int[], int) | Populates an int array with ints retrieved from the message. |
| GetInts(int[], int) | Populates an int array with ints retrieved from the message. |
| GetLong() | Retrieves a long from the message. |
| GetLongs() | Retrieves a long array from the message. |
| GetLongs(int) | Retrieves a long array from the message. |
| GetLongs(int, long[], int) | Populates a long array with longs retrieved from the message. |
| GetLongs(long[], int) | Populates a long array with longs retrieved from the message. |
| GetSByte() | Retrieves an sbyte from the message. |
| GetSBytes() | Retrieves an sbyte array from the message. |
| GetSBytes(int) | Retrieves an sbyte array from the message. |
| GetSBytes(int, sbyte[], int) | Populates a sbyte array with bytes retrieved from the message. |
| GetSBytes(sbyte[], int) | Populates a sbyte array with bytes retrieved from the message. |
| GetSerializable<T>() | Retrieves a serializable from the message. |
| GetSerializables<T>() | Retrieves an array of serializables from the message. |
| GetSerializables<T>(int) | Retrieves an array of serializables from the message. |
| GetSerializables<T>(int, T[], int) | Populates an array of serializables retrieved from the message. |
| GetSerializables<T>(T[], int) | Populates an array of serializables retrieved from the message. |
| GetShort() | Retrieves a short from the message. |
| GetShorts() | Retrieves a short array from the message. |
| GetShorts(short[], int) | Populates a short array with shorts retrieved from the message. |
| GetShorts(int) | Retrieves a short array from the message. |
| GetShorts(int, short[], int) | Populates a short array with shorts retrieved from the message. |
| GetString() | Retrieves a string from the message. |
| GetStrings() | Retrieves a string array from the message. |
| GetStrings(int) | Retrieves a string array from the message. |
| GetStrings(int, string[], int) | Populates a string array with strings retrieved from the message. |
| GetStrings(string[], int) | Populates a string array with strings retrieved from the message. |
| GetUInt() | Retrieves a uint from the message. |
| GetUInts() | Retrieves a uint array from the message. |
| GetUInts(int) | Retrieves a uint array from the message. |
| GetUInts(int, uint[], int) | Populates a uint array with uints retrieved from the message. |
| GetUInts(uint[], int) | Populates a uint array with uints retrieved from the message. |
| GetULong() | Retrieves a ulong from the message. |
| GetULongs() | Retrieves a ulong array from the message. |
| GetULongs(int) | Retrieves a ulong array from the message. |
| GetULongs(int, ulong[], int) | Populates a ulong array with ulongs retrieved from the message. |
| GetULongs(ulong[], int) | Populates a ulong array with ulongs retrieved from the message. |
| GetUShort() | Retrieves a ushort from the message. |
| GetUShorts() | Retrieves a ushort array from the message. |
| GetUShorts(int) | Retrieves a ushort array from the message. |
| GetUShorts(int, ushort[], int) | Populates a ushort array with ushorts retrieved from the message. |
| GetUShorts(ushort[], int) | Populates a ushort array with ushorts retrieved from the message. |
| GetVarLong() | Retrieves a positive or negative number from the message, using fewer bits for smaller values. |
| GetVarULong() | Retrieves a positive number from the message, using fewer bits for smaller values. |
| PeekBits(int, int, out byte) | Retrieves up to 8 bits from the specified position in the message. |
| PeekBits(int, int, out ushort) | Retrieves up to 16 bits from the specified position in the message. |
| PeekBits(int, int, out uint) | Retrieves up to 32 bits from the specified position in the message. |
| PeekBits(int, int, out ulong) | Retrieves up to 64 bits from the specified position in the message. |
| Release() | Returns the message instance to the internal pool so it can be reused. |
| ReserveBits(int) | Moves the message's internal write position by the given |
| SetBits(ulong, int, int) | Sets up to 64 bits at the specified position in the message. |
| SkipBits(int) | Moves the message's internal read position by the given |
| TrimPool() | Trims the message pool to a more appropriate size for how many Server and/or Client instances are currently running. |