Skip to content

Game.Net.ReservationData

Assembly:
Assembly-CSharp (inferred — common assembly for game scripts and mods)

Namespace:
Game.Net

Type:
struct

Base:
System.ValueType

Summary:
Represents a small, blittable data container used by the networking/reservation subsystem. It contains two byte fields: an offset and a priority. This struct is suitable for compact storage and for sending in binary messages or arrays because it is a value type with a simple layout. The exact semantics of m_Offset and m_Priority are determined by the code that consumes ReservationData (for example, scheduling or reservation queues in networking code).


Fields

  • public byte m_Offset
    A single-byte offset value. Typical uses include an index, a small time/frame offset, or an offset within a reservation slot. Range is 0–255. Default value is 0.

  • public byte m_Priority
    A single-byte priority value. Used to indicate the priority class of the reservation (0–255). The meaning of higher vs. lower values depends on the consumer code (e.g., lower value might mean higher priority or vice versa). Default value is 0.

Properties

  • This struct defines no properties. Use the public fields directly.

Constructors

  • public ReservationData()
    Implicit default constructor (value type). When you create a ReservationData with the default constructor or via variable declaration, both fields are initialized to 0.

Methods

  • This struct defines no methods.

Usage Example

// Create and initialize a reservation data instance
var reservation = new Game.Net.ReservationData();
reservation.m_Offset = 5;     // example offset
reservation.m_Priority = 10;  // example priority

// Or use object initializer syntax (C#)
var reservation2 = new Game.Net.ReservationData
{
    m_Offset = 1,
    m_Priority = 255
};

// Typical usage: store in an array or send as part of a binary message
var list = new Game.Net.ReservationData[10];
list[0] = reservation;

{{ Additional notes: - The struct is blittable and safe to copy without special marshaling for network or native interop scenarios. - Because fields are public and simple bytes, consumers should document the expected meaning of the two bytes to avoid misinterpretation. - If you need richer semantics (timestamps, larger ranges, signed values), consider wrapping this struct or replacing fields with larger types. }}