using Unity.Collections;
using Unity.Entities;
namespace ProjectM.Simulation
{
///
/// Connection intent for the M4 LAN host/join flow. Lives in Simulation so both the server and
/// client worlds can read it. A UI (ConnectionUI) — or, in the editor, the auto-host system —
/// writes the desired + endpoint and sets true; the
/// per-world ConnectionControlSystem turns it into a netcode NetworkStreamRequestListen /
/// NetworkStreamRequestConnect and clears . Direct IP/LAN only for now —
/// Unity Relay is deferred to a later pass. Created per-world as a singleton.
///
public enum ConnectionMode : byte
{
None,
Host,
Join,
}
public struct ConnectionConfig : IComponentData
{
/// What to do with this world's network stream.
public ConnectionMode Mode;
/// Dotted IPv4 to connect to (Join). Ignored for Host (binds AnyIpv4).
public FixedString64Bytes Address;
/// Listen/connect port.
public ushort Port;
/// Set true to request the control system act on Mode this frame; it clears the flag.
public bool Requested;
}
}